[ Disclaimer, Create new user --- Wiki markup help, Install P99 ]
Difference between revisions of "Template:Youtube"
From Project 1999 Wiki
(→Example #2: Specific Dimensions) |
|||
Line 10: | Line 10: | ||
<code><nowiki>{{youtube | <code><nowiki>{{youtube | ||
− | |||
| url= https://www.youtube.com/embed/CBttHicGbek | | url= https://www.youtube.com/embed/CBttHicGbek | ||
+ | | height=400 | ||
| width=400 | | width=400 | ||
}}</nowiki></code> | }}</nowiki></code> | ||
{{youtube | {{youtube | ||
− | |||
| url= https://www.youtube.com/embed/CBttHicGbek | | url= https://www.youtube.com/embed/CBttHicGbek | ||
+ | | height=400 | ||
| width=400 | | width=400 | ||
}} | }} | ||
</noinclude><includeonly><div class="youtube-placeholder" {{#if: {{{height}}}| data-height="{{{height}}}"}} {{#if: {{{width}}}| data-width="{{{width}}}"}} data-url="{{{url|{{{1}}}}}}">Loading Video ...</div></includeonly> | </noinclude><includeonly><div class="youtube-placeholder" {{#if: {{{height}}}| data-height="{{{height}}}"}} {{#if: {{{width}}}| data-width="{{{width}}}"}} data-url="{{{url|{{{1}}}}}}">Loading Video ...</div></includeonly> |
Revision as of 00:41, 23 October 2019
This template allows you to embed a Youtube video in a page. Note that the URL must be an "embed" URL (ie. it should start with the Youtube URL, followed by "/embed/", then the video ID).
Example #1: Basic
{{youtube | https://www.youtube.com/embed/CBttHicGbek}}
Loading Video ...
Example #2: Specific Dimensions
{{youtube
| url= https://www.youtube.com/embed/CBttHicGbek
| height=400
| width=400
}}
Loading Video ...