Template:YouTube/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(→Examples: Updated example to show title truncation) |
||
Line 10: | Line 10: | ||
==Examples== | ==Examples== | ||
* Specifying video ID and title. We are embedding only one video, so we should add the <code>br</code> tag to the 3rd parameter. In this example, <code><nowiki>{{YouTube|VqNcksMfAjM|The Legend of Zelda: The Wind Waker Intro|br}}</nowiki></code> will produce this: | * Specifying video ID and title. Titles longer than the box will automatically be truncated. We are embedding only one video, so we should add the <code>br</code> tag to the 3rd parameter. In this example, <code><nowiki>{{YouTube|VqNcksMfAjM|The Legend of Zelda: The Wind Waker Intro with title longer than box|br}}</nowiki></code> will produce this: | ||
{{YouTube|VqNcksMfAjM|The Legend of Zelda: The Wind Waker Intro|br}} | {{YouTube|VqNcksMfAjM|The Legend of Zelda: The Wind Waker Intro with title longer than box|br}} | ||
* Specifying only video ID. We are embedding only one video, so we should add the <code>br</code> tag to the 3rd parameter. In this example, <code><nowiki>{{YouTube|VqNcksMfAjM|br}}</nowiki></code> make the template use URL as title since no title was entered: | * Specifying only video ID. We are embedding only one video, so we should add the <code>br</code> tag to the 3rd parameter. In this example, <code><nowiki>{{YouTube|VqNcksMfAjM|br}}</nowiki></code> make the template use URL as title since no title was entered: |
Revision as of 05:45, 12 November 2012
This template provides a simplified way to use the EmbedVideo plugin. It automatically uses the standard thumbnail size and position used on this wiki
Usage
The YouTube template should be called in the following way:
{{YouTube|<videoID>|<title>|<new row?>}}
where
Video ID
is the ID is the bold part of the URL (http://www.youtube.com/watch?v=VqNcksMfAjM)Title
(optional) is the caption for the hiperlinknew row?
(optional) should always bebr
when used. This parameter tell the template if it should create a new row or not.
Examples
- Specifying video ID and title. Titles longer than the box will automatically be truncated. We are embedding only one video, so we should add the
br
tag to the 3rd parameter. In this example,{{YouTube|VqNcksMfAjM|The Legend of Zelda: The Wind Waker Intro with title longer than box|br}}
will produce this:
- Specifying only video ID. We are embedding only one video, so we should add the
br
tag to the 3rd parameter. In this example,{{YouTube|VqNcksMfAjM|br}}
make the template use URL as title since no title was entered:
Notes
- Using multiple calls will make the videos be side-by-side (the last video should ALWAYS include the
br
tag to the 3rd parameter):
- When you need one video in each row, you should add the
br
tag to the 3rd parameter of all videos, not just the last:
- If you use this template and forget to add the
br
tag to the 3rd parameter after calling the last video, you'll get something weird, like this topic!