Difference between revisions of "Template:Yt"
From Roll20 Wiki
Andreas J. (Talk | contribs) m |
Andreas J. (Talk | contribs) m (fix link errors, make logo slightly larger) |
||
Line 1: | Line 1: | ||
− | <includeonly><div class="plainlinks" style="display:inline-block;">[https://www.youtube.com/{{{1}}}]</div> [[File:Youtube-logo.png|middle| | + | <includeonly><div class="plainlinks" style="display:inline-block;">[https://www.youtube.com/{{{1}}}]</div> [[File:Youtube-logo.png|middle|18px]]</includeonly><noinclude>[[Category:Navigation Templates]]{{documentation}}</noinclude> |
Revision as of 12:11, 29 January 2021
Related templates: {{yt.be}}
(works better than {{yt}}
), {{yt.playlist}}
Template for linking to youtube pages/videos/profiles, shows the YT logo next to the link so it's clear it goes outside the wiki.
The template provides the youtube.com/
part of the url, so you need to copy the rest of the url after it. it uses the youtube.com/
instead of youtu.be/
so that links to profiles & playlists also work, not just links to videos. Leave a space after the url and then write the title(or similar), before closing the template. If you give it no name, the link will say [1]
instead. For links to playlists, {{yt.playlist}}
can instead be used.
Example:
Community Roundtable March 2021, or link version 2
{{yt|1=watch?v=y7TiougaEJc Community Roundtable March 2021}}, or {{yt|watch?v=y7TiougaEJc link version 2}}
For links with the youtu.be/
format, you can use the {{yt.be}}
template instead, or add 1=watch?v=
in front of the string of characters.
Example:
You have the link https://youtu.be/xKXpKIiB5WM
to the "5 Roll20 Crash Course - Rolling Dice"-video, then the correct result will be {{yt|watch?v=xKXpKIiB5WM Roll20 Crash Course - Rolling Dice}}
, resulting in this: Roll20 Crash Course - Rolling Dice
Normal YT links if you don't use the template: Roll20 Crash course
The above documentation is transcluded from Template:Yt/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |