Template:YouTube/doc: Difference between revisions

→‎Examples: Updated example to show title truncation
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: