Template:YouTube/Documentation: Difference between revisions

Template page
w:c:strategywiki>Moydow
m (fixing the sidebar example)
w:c:strategywiki>Procyon
m (fix documentation)
Line 6: Line 6:
<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 none (default: right)
|float=left, right, or center (default: right)
|width=width in pixels without "px" (default:200)
|width=width in pixels without "px" (default:200)
|title=name of the video
|title=name of the video

Revision as of 01:05, 13 July 2017

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

{{#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|center|YouTube title ||}}

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