The first video in the TASBot Re: (TASBot Revisited) series is out! TASBot Re: Gradius covers our first run from AGDQ 2014.

Historians wanted: Inquire here.

Template:YouTube video: Difference between revisions

Template page
m (Fix syntax (this still isn't Markdown))
Tag: 2017 source edit
(Remove channel-name param (changed my mind on this being good for consistency, we don't want consistency necessarily))
Tag: Undo
Line 1: Line 1:
<onlyinclude><includeonly>[https://youtu.be/{{{1}}} {{{2|{{#if:{{{channel-name|}}}|{{{channel-name}}} (YouTube)|YouTube video}}}}}]</includeonly></onlyinclude>
<onlyinclude><includeonly>[https://youtu.be/{{{1}}} {{{2|YouTube video}}}]</includeonly></onlyinclude>


Link to a specific video on YouTube. <code><nowiki>{{YouTube video|2GtbY1XWGlQ|click here}}</nowiki></code> &longrightarrow; {{YouTube video|2GtbY1XWGlQ|click here}}
Link to a specific video on YouTube. <code><nowiki>{{YouTube video|2GtbY1XWGlQ|click here}}</nowiki></code> &longrightarrow; {{YouTube video|2GtbY1XWGlQ|click here}}
Line 5: Line 5:
You can add query parameters such as <code>?t=1m10s</code>, but it requires that you explicitly number both parameters:<br/>
You can add query parameters such as <code>?t=1m10s</code>, but it requires that you explicitly number both parameters:<br/>
<code><nowiki>{{YouTube video|1=2GtbY1XWGlQ?t=1m10s|2=click here}}</nowiki></code> &longrightarrow; {{YouTube video|1=2GtbY1XWGlQ?t=1m10s|2=click here}}
<code><nowiki>{{YouTube video|1=2GtbY1XWGlQ?t=1m10s|2=click here}}</nowiki></code> &longrightarrow; {{YouTube video|1=2GtbY1XWGlQ?t=1m10s|2=click here}}
Passing e.g. <code>channel-name=dwangoAC</code> ''instead of a label'' will generate something like {{YouTube video|2GtbY1XWGlQ|channel-name=dwangoAC}}.


{{TemplateData preamble}}<templatedata>
{{TemplateData preamble}}<templatedata>
Line 22: Line 20:
"example": "click here",
"example": "click here",
"default": "YouTube video"
"default": "YouTube video"
},
"channel-name": {
"label": "Channel name",
"description": "set this instead of a label to generate one",
"type": "string"
}
}
},
},

Revision as of 14:04, 3 August 2024


Link to a specific video on YouTube. {{YouTube video|2GtbY1XWGlQ|click here}}click here

You can add query parameters such as ?t=1m10s, but it requires that you explicitly number both parameters:
{{YouTube video|1=2GtbY1XWGlQ?t=1m10s|2=click here}}click here


The below documentation is automatically generated from JSON.

It can be changed by editing this page, but note that it's only the documentation (for the visual editor)—the actual template part must also be edited, manually.

Link to a specific video on YouTube.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Video ID1

no description

Example
2GtbY1XWGlQ
URLrequired
Label text2

no description

Default
YouTube video
Example
click here
Lineoptional