Template:YouTube: Difference between revisions

Template page
w:c:strategywiki>Notmyhandle
(added spacer for sidebar)
w:c:strategywiki>Prod
(small use case can be accomplished directly)
Line 1: Line 1:
<includeonly>{{#if:{{{sidebar|}}}|<div style="float:left;width:33%">&nbsp;</div><div style="float:left;width:50%;">|}}{{#ev:youtube|{{{video}}}|{{{width|200}}}|{{{float|right}}}|<span class="plainlinks">'''[http://www.youtube.com/watch?v={{{video}}}&eurl=http://strategywiki.org/wiki/{{FULLPAGENAMEE}}&feature=player_embedded {{{title}}}]'''</span> {{#if:{{{duration|}}}|<small>({{{duration}}})</small>}}{{#if:{{{description|}}}|<br />{{{description}}}}}}}{{#if:{{{sidebar|}}}|</div>{{-}}|}}</includeonly><noinclude>{{-}}
<includeonly>{{#ev:youtube|{{{video}}}|{{{width|200}}}|{{{float|right}}}|<span class="plainlinks">'''[http://www.youtube.com/watch?v={{{video}}}&eurl=http://strategywiki.org/wiki/{{FULLPAGENAMEE}}&feature=player_embedded {{{title}}}]'''</span> {{#if:{{{duration|}}}|<small>({{{duration}}})</small>}}{{#if:{{{description|}}}|<br />{{{description}}}}}}}</includeonly><noinclude>{{-}}
{{Documentation}}
{{Documentation}}


[[Category:Templates|Y]]</noinclude>
[[Category:Templates|Y]]</noinclude>

Revision as of 16:16, 2 June 2012

This page has been transcluded from Template:YouTube/Documentation.


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

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