This is a wiki for a reason. Anyone can contribute. If you see something that is inaccurate or can be improved, don't ask that it be fixed--just improve it.
[ Disclaimer, Create new user --- Wiki markup help, Install P99 ]

Difference between revisions of "Template:Youtube"

From Project 1999 Wiki
Jump to: navigation, search
(Example #2: Longer Version)
(Example #3: Longer Version: Specific Dimensions)
Line 33: Line 33:
  
 
=== Example #3: Longer Version: Specific Dimensions ===
 
=== Example #3: Longer Version: Specific Dimensions ===
 +
If you use this version you '''can not''' add a space before the ID (ie. after the "=").
  
 
<code><nowiki>{{youtube </nowiki></code>
 
<code><nowiki>{{youtube </nowiki></code>

Revision as of 17:11, 25 October 2019

This template allows you to embed a Youtube video in a page. To use it you simply provide the ID of a Youtube video, and optionally a height and width.

Although you can use this template anywhere (that is appropriate) in the wiki, the Videos page is one great place to start.

Contents

Finding a Video's ID

Every Youtube video includes its ID in its URL. For instance, if you right click on the Green Trailer video and choose "Copy video URL", you'd get the URL:

https://youtu.be/CBttHicGbek

The ID is the part after "https://youtu.be/", in other words:

https://youtu.be/CBttHicGbek

Other Youtube URLs may put it elsewhere, but it always be present. For instance, if you visit the Youtube page for that video, it will take you to:

https://www.youtube.com/watch?v=CBttHicGbek

Examples

Example #1: Short Version

If you use this version you can not add a space before the ID (ie. after the "|").

{{youtube |CBttHicGbek}}

Loading Video ...

Example #2: Longer Version

If you use this version you can not add a space before the ID (ie. after the "=").

{{youtube | id=CBttHicGbek }}

Loading Video ...

Example #3: Longer Version: Specific Dimensions

If you use this version you can not add a space before the ID (ie. after the "=").

{{youtube

| id=CBttHicGbek

| height=576

| width=1024

}}

Loading Video ...