Template:YouTube/Documentation: Difference between revisions

Template page
w:c:strategywiki>Najzere
(update)
w:c:strategywiki>Notmyhandle
(added sidebar example)
Line 1: Line 1:
[[Image:YouTube logo.png]]
[[File:YouTube logo.png]]


This is a template for [http://www.youtube.com YouTube] videos.
This is a template for [http://www.youtube.com YouTube] videos.
Line 11: Line 11:
|duration=duration in minutes:seconds (optional)
|duration=duration in minutes:seconds (optional)
|description=description of the video (optional)
|description=description of the video (optional)
|sidebar=put a 1 here to center when using inside of a sidebar (optional)
}}</pre>
}}</pre>


Line 32: Line 33:
}}
}}
</pre>
</pre>
{{-}}
==Example 2: use in a sidebar==
{{Sidebar
|width=300px
|title=Sidebar title
|contents={{YouTube|video=-F_rnd-DKIg|title=YouTube title|sidebar=1}}
Lorem ipsum.}}
<pre>
{{Sidebar
|width=300px
|title=Sidebar title
|contents={{YouTube|video=-F_rnd-DKIg|title=YouTube title|sidebar=1}}
Lorem ipsum.}}
</pre>
<noinclude>[[Category:Template documentation|Y]]</noinclude>
<noinclude>[[Category:Template documentation|Y]]</noinclude>

Revision as of 15:26, 29 May 2012

This is a template for YouTube videos.

This template is used as follows:

{{YouTube
|video=ID of the video (not its full URL)
|float=left, right, or none (default: right)
|width=width in pixels without "px" (default:200)
|title=name of the video
|duration=duration in minutes:seconds (optional)
|description=description of the video (optional)
|sidebar=put a 1 here to center when using inside of a sidebar (optional)
}}

Example

{{#ev:youtube|wsCNoJagyL8|350|right|Nonlethal Walkthrough - Lebedev's Airfield (1/4) (9:42)
From Battery Park through Brooklyn Bridge Station.||}}

{{YouTube
|video=wsCNoJagyL8
|float=right
|width=350
|title=Nonlethal Walkthrough - Lebedev's Airfield (1/4)
|duration=9:42
|description=From Battery Park through Brooklyn Bridge Station.
}}

Example 2: use in a sidebar

Page Template:Sidebar/styles.css has no content.

Sidebar title

{{#ev:youtube|-F_rnd-DKIg|300|right|YouTube title ||}}

Lorem ipsum.
{{Sidebar
|width=300px
|title=Sidebar title
|contents={{YouTube|video=-F_rnd-DKIg|title=YouTube title|sidebar=1}}
Lorem ipsum.}}