Template:EmbedVideo: Difference between revisions

Jump to navigation Jump to search
(Made caption bigger and commented out white spaces to fix the blank space when viewing the documentation)
mNo edit summary
Line 62: Line 62:
==Examples==
==Examples==
* Embed a video by 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>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}} with caption text longer than thumbnail box size<nowiki>|br}}</nowiki></code> will produce this:
* Embed a video by 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>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}} with caption text longer than thumbnail box size<nowiki>|br}}</nowiki></code> will produce this:
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}} with title longer than box|br}}
{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}} with caption text longer than thumbnail box size|br}}


* Embed a video by specifying only video ID, so the 2nd parameter is null. We are embedding only one video, so we should add the <code>br</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}<nowiki>||br}}</nowiki></code> make the template use URL as title since no title was entered:
* Embed a video by specifying only video ID, so the 2nd parameter is null. We are embedding only one video, so we should add the <code>br</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}<nowiki>||br}}</nowiki></code> make the template use URL as title since no title was entered:
Line 69: Line 69:
* Return a hiperlink to watch the video on {{#var:servicename}} by specifying video ID and title. We want only the hiperlink, so we should add the <code>link</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}<nowiki>|link}}</nowiki></code> will produce this:
* Return a hiperlink to watch the video on {{#var:servicename}} by specifying video ID and title. We want only the hiperlink, so we should add the <code>link</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}<nowiki>|link}}</nowiki></code> will produce this:
:{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}|link}}
:{{{{#var:templatename}}|{{#var:videoid}}|{{#var:videocaption}}|link}}


* Return a hiperlink to watch the video on {{#var:servicename}} by specifying only video ID. We want only the hiperlink, so we should add the <code>link</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}<nowiki>||link}}</nowiki></code> make the template use URL as title since no title was entered:
* Return a hiperlink to watch the video on {{#var:servicename}} by specifying only video ID. We want only the hiperlink, so we should add the <code>link</code> tag to the 3rd parameter. In this example, <code><nowiki>{{</nowiki>{{#var:templatename}}|{{#var:videoid}}<nowiki>||link}}</nowiki></code> make the template use URL as title since no title was entered: