Template:LinkYT: Difference between revisions

From LoadingReadyWiki
Jump to navigationJump to search
Created page with "<includeonly>[https://youtu.be/{{{0}}} {{{1|}}}]</includeonly><noinclude>Template for formatting links to YouTube. == Usage == <nowiki>{{LinkYT|Video ID|Display Text}}</nowi..."
 
m Add recolor support, and fix parameter indices starting at 0 not 1
Line 1: Line 1:
<includeonly>[https://youtu.be/{{{0}}} {{{1|}}}]</includeonly><noinclude>Template for formatting links to YouTube.
<includeonly>[https://youtu.be/{{{1}}} <span style="color:{{{3|inherit}}};">{{{2|}}}</span>]</includeonly><noinclude>Template for formatting links to YouTube.


== Usage ==
== Usage ==
Line 5: Line 5:
* <code>Video ID</code> is the 11-character video ID (the bit that's after <code>v=</code> on the watch page).
* <code>Video ID</code> is the 11-character video ID (the bit that's after <code>v=</code> on the watch page).
* <code>Display Text</code> is the text to turn into a link, just like adding text to a normal external link.
* <code>Display Text</code> is the text to turn into a link, just like adding text to a normal external link.
* <code>color</code> can be any valid CSS color (named or hex starting with #), to recolor the link.
[[Category:Formatting Templates]]</noinclude>
[[Category:Formatting Templates]]</noinclude>

Revision as of 04:17, 19 October 2019

Template for formatting links to YouTube.

Usage

{{LinkYT|Video ID|Display Text}}
  • Video ID is the 11-character video ID (the bit that's after v= on the watch page).
  • Display Text is the text to turn into a link, just like adding text to a normal external link.
  • color can be any valid CSS color (named or hex starting with #), to recolor the link.