w:c:strategywiki>Prod m (→Example: fix layout) |
m (12 revisions imported) |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
[[ | [[File:YouTube logo.png|200px]] | ||
This is a template for [http://www.youtube.com YouTube] videos. | This is a template for [http://www.youtube.com YouTube] videos. | ||
This template is used as follows: | This template is used as follows: | ||
<pre>{{YouTube | <pre>{{YouTube | ||
|video=ID of the video (not its full URL) | |video=ID of the video (not its full URL) | ||
|float=left, right, or center (default: right) | |||
|width=width in pixels without "px" (default:200) | |||
|title=name of the video | |title=name of the video | ||
|duration=duration in minutes:seconds (optional) | |duration=duration in minutes:seconds (optional) | ||
|description=description of the video (optional) | |description=description of the video (optional) | ||
}}</pre> | }}</pre> | ||
Line 14: | Line 15: | ||
==Example== | ==Example== | ||
{{YouTube | {{YouTube | ||
|video=wsCNoJagyL8 | |||
|float=right | |float=right | ||
| | |width=350 | ||
|title=Nonlethal Walkthrough - Lebedev's Airfield (1/4) | |title=Nonlethal Walkthrough - Lebedev's Airfield (1/4) | ||
|duration=9:42 | |duration=9:42 | ||
Line 22: | Line 24: | ||
<pre> | <pre> | ||
{{YouTube | {{YouTube | ||
|video=wsCNoJagyL8 | |||
|float=right | |float=right | ||
| | |width=350 | ||
|title=Nonlethal Walkthrough - Lebedev's Airfield (1/4) | |title=Nonlethal Walkthrough - Lebedev's Airfield (1/4) | ||
|duration=9:42 | |duration=9:42 | ||
Line 29: | Line 32: | ||
}} | }} | ||
</pre> | </pre> | ||
{{-}} | |||
==Example 2: use in a sidebar== | |||
{{Sidebar | |||
|width=300px | |||
|title=Sidebar title | |||
|contents={{YouTube|video=-F_rnd-DKIg|title=YouTube title|float=center}} | |||
Lorem ipsum.}} | |||
<pre> | |||
{{Sidebar | |||
|width=300px | |||
|title=Sidebar title | |||
|contents={{YouTube|video=-F_rnd-DKIg|title=YouTube title|float=center}} | |||
Lorem ipsum.}} | |||
</pre> | |||
<noinclude>[[Category:Template documentation|Y]]</noinclude> | <noinclude>[[Category:Template documentation|Y]]</noinclude> |
Latest revision as of 18:22, 28 October 2023
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 center (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) }}
Example[edit source]
{{#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[edit source]
Page Template:Sidebar/styles.css has no content.
{{Sidebar |width=300px |title=Sidebar title |contents={{YouTube|video=-F_rnd-DKIg|title=YouTube title|float=center}} Lorem ipsum.}}