- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
Template:Yt: Difference between revisions
Jump to navigation
Jump to search
imported>TabbyGarf No edit summary |
imported>TabbyGarf No edit summary |
||
Line 12: | Line 12: | ||
| @ = @{{{2}}}/ {{{3|@{{{2}}}}}}]'''</span> | | @ = @{{{2}}}/ {{{3|@{{{2}}}}}}]'''</span> | ||
| custom = {{{2}}}/ {{{3|{{{2}}}}}}]'''</span> | | custom = {{{2}}}/ {{{3|{{{2}}}}}}]'''</span> | ||
| u = user/{{{2}}}/ {{{ | | u = user/{{{2}}}/ {{{2|{{{3}}}}}}]'''</span> | ||
| c = {{{2}}}/ {{{3|{{{2}}}}}}]'''</span> | | c = {{{2}}}/ {{{3|{{{2}}}}}}]'''</span> | ||
| ch = channel/{{{2}}}/ {{{3|YouTube}}}] | | ch = channel/{{{2}}}/ {{{3|YouTube}}}] | ||
| user/{{{1}}}/ {{{1|2}}}]'''</span> | | user/{{{1}}}/ {{{1|{{{2}}}}}}]'''</span> | ||
}}</includeonly><noinclude>{{documentation}} [[Category:Link Templates]]</noinclude> | }}</includeonly><noinclude>{{documentation}} [[Category:Link Templates]]</noinclude> |
Revision as of 23:37, 9 January 2023
Usage
This is a template to link to YouTube Channels. The template has been future-proofed in the case of YouTube making yet another url format
{{yt| type | id | description }}
- type - the portion in the url in between slashes, can be user (u), channel (ch), @, custom (cu) (for vanity urls) or the user id itself!
- id - the last portion of the URL to a YouTube profile, after user/, channel, @ or youtube.com/ and youtube.com/c/ in case of custom URLs .
- description (optional) - replaces the profile name with your text
Note: do not use whitespace immediately before or after vertical bars or curly brackets
User
{{yt|id|description}} {{yt|u|id|description}} {{yt|user|id|description}} {{yt|id|description}}
produces:
Channel
{{yt|ch|id|description}} {{yt|channel|id|description}} {{yt|c|id|description}}
produces:
- description - with description
- YouTube - without description
Channel (c)
{{yt|c2|id|description}}
produces:
- c2 - with description
Handles (@)
{{yt|@|id|description}} {{yt|custom|@id|description}} {{yt|cu|@id|description}}
produces:
- description - with description
- @id - without description
Custom URLs
{{yt|custom|customurl|description}} {{yt|cu|customurl|description}}
produces:
The above documentation is transcluded from Template:Yt/doc. (edit | history) Changes can be experimented in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |