Template talk:YouTube
From Wikia Help
Contents |
[edit] Usage
{{YouTube|caption|<youtube width="250" height="200">youtube code</youtube>}}
Craigslist Foundation Non-Profit Bootcamp Podcasts
This template shows a YouTube video with a default size of 250px in width.
- The first parameter is the caption which appears above the video; this can contain standard wikitext.
- The second is the full text of the <youtube> extension code, which contains editable extension parameters for:
- width and height (maximum 425x350 pixels).
- youtube code (the alphanumeric code after the equals sign at the end of a YouTube URL).
[edit] Example use
{{YouTube|'''Example use'''<br />Craigslist Foundation ''Non-Profit'' Bootcamp [[Podcasts]]|<youtube width="200" height="160">zLJKedGAEY8</youtube>}}
[edit] Notes
Because of the order in which the template and the extension are processed, the <youtube> extension code cannot contain template parameters itself.
A template containing code such as <youtube width="{{{1}}}" height="{{{2}}}">{{{3}}}</youtube> will not function unless the template is always substituted.
If you wish to always display videos at a larger or smaller size, edit the template (on your wiki) to alter the default width and height in the youtube extension code. You must also alter the width code (style="width:256px;") in the first line of the template to equal the default width plus 6 pixels, to allow for the padding specified in the stylesheet.
The maximum size is 425x350 pixels. For best results, the height should be about 4/5 (80%) of the width. Some examples of good ratios include 125x100, 200x160, and 250x200.
