Difference between revisions of "Template:Youtube"

From Grand Theft Wiki
Jump to: navigation, search
(Updating with #ev (embed video))
 
Line 5: Line 5:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
{{#if:{{{video1|}}}|<td>{{#widget:YouTube|id={{{video1}}}|width={{#if:{{{width1|}}}|{{{width1}}}|500}}}}</td>}}
+
{{#if:{{{video1|}}}|<td>{{#ev:youtube|{{{video1}}}|{{#if:{{{width1|}}}|{{{width1}}}|500}}}}</td>}}
{{#if:{{{video2|}}}|<td>{{#widget:YouTube|id={{{video2}}}|width={{#if:{{{width2|}}}|{{{width2}}}|500}}}}</td>}}
+
{{#if:{{{video2|}}}|<td>{{#ev:youtube|{{{video2}}}|{{#if:{{{width2|}}}|{{{width2}}}|500}}}}</td>}}
 
</tr>
 
</tr>
 
</table></includeonly><noinclude>{{doc}}</noinclude>
 
</table></includeonly><noinclude>{{doc}}</noinclude>

Latest revision as of 00:11, 1 May 2013

This documentation is imported from Template:Youtube/doc

This template embeds 1 or 2 YouTube videos into a page.

Note that you can also use {{YoutubeAudio}} to hide the video and use YouTube as an audio player.

Parameters
{{youtube
|video1 = First YouTube video ID
|title1 = Video title (optional)
|width1 = Width of video (optional, default 500 pixels)
|video2 = Second YouTube video ID
|title2 = Video title (optional)
|width2 = Width of video (optional, default 500 pixels)
}}
Example
{{youtube|video1=MpmDawqOfqs|title1=GTA Vice City trailer}}
GTA Vice City trailer