Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:YouTube link: Difference between revisions

Template page
m Link YouTube video labels directly
m Build reusable tournament data and rendering system
Line 1: Line 1:
<includeonly><templatestyles src="Template:YouTube link/styles.css" />{{#if:{{{id|{{{1|}}}}}}|<span class="loka-youtube-link">[https://www.youtube.com/watch?v={{{id|{{{1|}}}}}} {{{label|{{PAGENAME}}}}}] on [[File:YouTube icon.png|14px|link=|alt=YouTube]]&#32;YouTube</span>{{#ifeq:{{lc:{{{explicit|}}}}}|yes|<span class="loka-youtube-link-warning">Please note this video may contain strong language</span>}}}}</includeonly><noinclude>
<includeonly><templatestyles src="Template:YouTube link/styles.css" />{{#if:{{{id|{{{1|}}}}}}|<span class="loka-youtube-link">[https://www.youtube.com/watch?v={{{id|{{{1|}}}}}} &quot;{{{label|{{PAGENAME}}}}}&quot;] on [[File:YouTube icon.png|14px|link=|alt=YouTube]]&#32;YouTube{{#if:{{{credit|}}}|<span class="loka-youtube-link-credit">&#32;(credit: {{{credit|}}})</span>}}</span>{{#ifeq:{{lc:{{{explicit|}}}}}|yes|<span class="loka-youtube-link-warning">Please note this video may contain strong language</span>}}}}</includeonly><noinclude>
== Usage ==
== Usage ==


<pre>{{YouTube link|id=VIDEO_ID|label=Video title}}</pre>
<pre>{{YouTube link|id=VIDEO_ID|label=Video title|credit=Recorder name}}</pre>


The first unnamed parameter can be used instead of <code>id</code>. The linked label defaults to the page name
The first unnamed parameter can be used instead of <code>id</code>. The linked label defaults to the page name and is always shown in quotes


Set <code>explicit=yes</code> to show the strong-language notice
Set <code>explicit=yes</code> to show the strong-language notice. <code>credit</code> is optional and, when given, shows who recorded/uploaded the video


[[Category:External link templates]]
[[Category:External link templates]]
</noinclude>
</noinclude>

Revision as of 16:55, 19 August 2026

Usage

{{YouTube link|id=VIDEO_ID|label=Video title|credit=Recorder name}}

The first unnamed parameter can be used instead of id. The linked label defaults to the page name and is always shown in quotes

Set explicit=yes to show the strong-language notice. credit is optional and, when given, shows who recorded/uploaded the video

Contents