ATTENTION: This wiki has been fully discontinued. The Animal Crossing Wiki, formerly hosted on Miraheze, has relocated to animalcrossing.indyamos.com as an enhanced version of this project. Certain pages may be imported from here, but stubs cannot be imported. No pages can be edited except by sysops. For additional information, please view Special:Diff/57616.
Template:Youtube: Difference between revisions
m (1 revision imported) |
Lavapop101 (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
This template is a convenient way to embed YouTube videos on the page. | <noinclude> This template is a convenient way to embed YouTube videos on the page. | ||
;Use | ;Use | ||
| Line 76: | Line 76: | ||
"format": "inline" | "format": "inline" | ||
} | } | ||
</templatedata> | </templatedata> </noinclude> | ||
[[Category:Templates/Format]]</noinclude> | [[Category:Templates/Format]]</noinclude> | ||
Revision as of 10:18, 3 July 2024
This template is a convenient way to embed YouTube videos on the page.
- Use
{{youtube|youtube video id|Descriptive text}}
{{youtube|video=youtube video id or video URL|text=Descriptive text}}
- Parameters
If no parameter name is specified, the first unnamed parameter will be the video ID on YouTube. The second is optional and will be a description that will be shown below the video.
Keep in mind that if you put the URL of the video you must use names in the parameters, because the URL includes the "=" sign and makes it confused with the name of a parameter.
If named parameters are specified, they can be:
- video: YouTube URL or video ID.
- text (optional): description that will be displayed below the video.
- width (optional): width in pixels of the video.
- height (optional): height in pixels of the video.
- thumb (optional): specify right or left so that it is aligned to the right or left.
- youtube video id
The video ID is a code made up exclusively of letters and numbers and is part of the video URL.
Below are examples of YouTube URLs and the video ID in bold:
- http://www.youtube.com/watch?v=0G1QZRPtstI
- http://www.youtube.com/watch?v=0G1QZRPtstI&feature=related
- http://youtu.be/0G1QZRPtstI
<templatedata> { "params": { "1": { "aliases": [ "video" ], "label": "Video", "description": "Video ID (11-letter code) or URL", "example": "0G1QZRPtstI", "type": "line", "required": true }, "2": { "aliases": [ "text" ], "label": "Text", "description": "Descriptive text", "type": "string", "suggested": true }, "width": { "label": "Width", "description": "Video width in pixels", "example": "300", "type": "number", "default": "300" }, "height": { "label": "Height", "description": "Video height", "example": "233", "type": "number", "default": "233" }, "thumbs": { "label": "Alignment", "description": "Specify right or left to align left or right", "example": "right" } }, "description": "Embed YouTube video", "format": "inline" } </templatedata>