Difference between revisions of "Template:Youtube-gallery"
Inceptor57 (talk | contribs) m (test2) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{#vardefine: i | 1 }}{{#while: | + | <includeonly><div class="video_gallery">{{#vardefine: i | 1 }}{{#while: |
|{{#if:{{{{{#var: i }}|}}}|true}} | |{{#if:{{{{{#var: i }}|}}}|true}} | ||
− | |<div class=" | + | |<div class="video"><div class="video_embed">{{#ev:youtube|{{{{{#var: i }}|}}}}}</div><div class="video_desc">{{{{{#expr: {{#var: i }} + 1 }}|}}}</div></div> |
{{#vardefine: i | {{#expr: {{#var: i }} + 2 }} }} | {{#vardefine: i | {{#expr: {{#var: i }} + 2 }} }} | ||
− | }}< | + | }}</div></includeonly><noinclude> |
{{doc}} | {{doc}} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
Line 9: | Line 9: | ||
{ | { | ||
"params": {}, | "params": {}, | ||
− | "description": "This template can be used to add a left-aligned YouTube video to an article. Word wrap is unavailable (the layout is basically a video gallery)." | + | "description": "This template can be used to add a left-aligned YouTube video to an article. Word wrap is unavailable (the layout is basically a video gallery). To use, add parameter fields as numbers (starting at 1). Odd numbers denote the video id (everything after \"?v=\"), the consecutive even number denotes the desired description underneath the video." |
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |
Latest revision as of 17:51, 21 September 2020
This template can be used to add a left-aligned YouTube video to an article. Word wrap is unavailable (the layout is basically a video gallery).
How to use:
{{Youtube-gallery|<id1>|<signature1>|<id2>|<signature2>|<id3>|<signature3>|...}}
- ID is the code used after "v=" in the link address (for example, http://www.youtube.com/watch?v=0-J5Vg0SxLc).
There is no restriction on the number of videos that can be used in a gallery.
The caption can be empty. For example:
{{Youtube-gallery|<id1>|<signature1>|<id2>||<id3>|}}
Please note that you should not delete the corresponding vertical slash if leaving the caption blank.
Example of use:
{{Youtube-gallery|neFsLnNSatw|Z 20 Karl Galster}} {{Youtube-gallery|neFsLnNSatw|Z 20 Karl Galster|a8_8L-F44ts|Magach 3|6vPOqfNbv3A|Martin-Baker M.B.5}} {{Youtube-gallery|neFsLnNSatw||a8_8L-F44ts|}}
See also
- Template:Youtube — for better customisation of a single video.
This template can be used to add a left-aligned YouTube video to an article. Word wrap is unavailable (the layout is basically a video gallery). To use, add parameter fields as numbers (starting at 1). Odd numbers denote the video id (everything after "?v="), the consecutive even number denotes the desired description underneath the video.
Parameter | Description | Type | Status | |||
---|---|---|---|---|---|---|
No parameters specified |