Navigation menu
Template:YouTube: Difference between revisions
From Metroid Wiki
Melchizedek (talk | contribs) No edit summary |
m (?) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{|style="margin: | <includeonly>{|style="margin: 2em; margin-top:0 !important; padding: 3px 0 3px 0 !important; margin-{{#switch:{{{3|}}}|{{Void}}=left|left=left|right=right|center=center|#default=left}}:0 !important; {{round}}; background-color:#{{mw color}}; border: 2px solid #{{mw color light}};width:100px;float:{{#switch:{{{3|}}}|{{Void}}=left|left=left|right=right|center=center|#default=center}}" | ||
|<div> | |<div> | ||
|{{#ev:youtube|{{{1}}}|{{#ifeq:{{{2|}}}|{{Void}}|250|{{{2|}}}}}}}{{#switch:{{{3|}}}|{{Void}}={{#ifeq:{{{4|}}}|{{Void}}|{{Void}}|<br>{{{4|}}}}}|left={{#ifeq:{{{4|}}}|{{Void}}|{{Void}}|<br>{{{4|}}}}}|right={{#ifeq:{{{4|}}}|{{Void}}|{{Void}}|<br>{{{4|}}}}}|center={{#ifeq:{{{4|}}}|{{Void}}|{{Void}}|<br>{{{4|}}}}}|#default={{#ifeq:{{{3|}}}|{{Void}}|{{Void}}|<br>{{{3|}}}}}}} | |{{#ev:youtube|{{{1}}}|{{#ifeq:{{{2|}}}|{{Void}}|250|{{{2|}}}}}}}{{#switch:{{{3|}}}|{{Void}}={{#ifeq:{{{4|}}}|{{Void}}|{{Void}}|<br>{{{4|}}}}}|left={{#ifeq:{{{4|}}}|{{Void}}|{{Void}}|<br>{{{4|}}}}}|right={{#ifeq:{{{4|}}}|{{Void}}|{{Void}}|<br>{{{4|}}}}}|center={{#ifeq:{{{4|}}}|{{Void}}|{{Void}}|<br>{{{4|}}}}}|#default={{#ifeq:{{{3|}}}|{{Void}}|{{Void}}|<br>{{{3|}}}}}}} | ||
Line 18: | Line 18: | ||
*'''''Location''''' is where to have the video. (i.e. right, left, or center.) Defaults to left if blank. | *'''''Location''''' is where to have the video. (i.e. right, left, or center.) Defaults to left if blank. | ||
*'''''Caption''''' is an optional caption to describe the video. | *'''''Caption''''' is an optional caption to describe the video. | ||
**If ''location'' is neither '''left''', '''right''', nor '''center''', then the it is assumed to be a caption and the video's location is set to " | **If ''location'' is neither '''left''', '''right''', nor '''center''', then the it is assumed to be a caption and the video's location is set to "center". | ||
[[Category:Formatting Templates|Y]] | [[Category:Formatting Templates|Y]] | ||
</noinclude> | </noinclude> |
Latest revision as of 23:20, 15 November 2012
Purpose[edit source]
This template is for conveniently displaying Youtube videos on an article.
Usage[edit source]
To use this template type:
{{YouTube|Video Code|Video Size|Location|Caption}}
Where:
- Video Code is the unique sequence of letters, numbers, and characters that point to the video.
- Video Size is the desired size of the video. Defaults to 250 pixels.
- Location is where to have the video. (i.e. right, left, or center.) Defaults to left if blank.
- Caption is an optional caption to describe the video.
- If location is neither left, right, nor center, then the it is assumed to be a caption and the video's location is set to "center".