Template:YouTube: Difference between revisions
Appearance
Pepperonipi (talk | contribs) small param error |
m Replaced old documentation references with the Documentation template. |
||
| Line 1: | Line 1: | ||
[https://youtube.com/{{#if: {{{v|}}}|watch?v={{{v|}}}|{{#if:{{{u|}}}|user/{{{u|}}}|{{#if:{{{c|}}}|channel/{{{c|}}}|{{#if: {{{s|}}}|show/{{{s|}}}|{{#if: {{{p|}}}|playlist?list={{{p|}}}}}}}}}}}}} {{{1|{{#if:{{{u|}}}|{{{u|}}}|Name}}}}}]<noinclude> | [https://youtube.com/{{#if: {{{v|}}}|watch?v={{{v|}}}|{{#if:{{{u|}}}|user/{{{u|}}}|{{#if:{{{c|}}}|channel/{{{c|}}}|{{#if: {{{s|}}}|show/{{{s|}}}|{{#if: {{{p|}}}|playlist?list={{{p|}}}}}}}}}}}}} {{{1|{{#if:{{{u|}}}|{{{u|}}}|Name}}}}}]<noinclude> | ||
{{ | {{Documentation}}[[Category:Templates]]</noinclude> | ||
Latest revision as of 23:10, 5 August 2020
The YouTube template creates a link to a YouTube video, playlist, channel, or show.
Parameters
One of the following should be used:
c- the channel string to link to (ex:https://www.youtube.com/channel/UCg3fbV5gFNml-HZrBGPo9ow)p- the playlist to link to (ex:https://www.youtube.com/playlist?list=PLXrlspzNXNXstJSX_HwOExtaR5Z4wTbOt)s- the show to link to (ex:https://www.youtube.com/show/startrek)u- the user to link to (ex:https://www.youtube.com/user/ScienceOlympiadTV)v- the video to link to (ex:https://www.youtube.com/watch?v=SE8JIgwc0h0)
With an optional alias parameter:
1- the alias (the text that shows for the clickable link)
Examples
| Code | Result |
|---|---|
{{YouTube|u=ScienceOlympiadTV}}
|
ScienceOlympiadTV |
{{YouTube|c=UCg3fbV5gFNml-HZrBGPo9ow}}
|
Name |
{{YouTube|v=SE8JIgwc0h0}}
|
Name |
{{YouTube|p=PL1t-RzwecjdNpcfzbStAz2ocsuxrxsHZ0|SciOly Tourneys}}
|
SciOly Tourneys |
{{YouTube|c=UCg3fbV5gFNml-HZrBGPo9ow|Boca Raton SO}}
|
Boca Raton SO |