Template:Carousel/doc

Template page
< Template:Carousel
Revision as of 17:50, 8 October 2021 by Chao (talk | contribs) (added shorthand "images" parameter - just list the images separated by semicolons)

This template is used for a slider made out of thumbnails.

A single list item also has the shortcut template Template:p.

Usage

{{Carousel
|width = 
|align = 
|list=
<div class="jcarousel-item">[[File:exampleimage1.jpg]]</div>
<div class="jcarousel-item">[[File:exampleimage2.jpg]]</div>
...
}}

{{Carousel
|width = 
|align = 
|list=
{{p|[[File:exampleimage1.jpg|thumb|300px]]}}
{{p|[[File:exampleimage2.jpg]]}}
...
}}


Shorthand using "images" parameter instead of "list"

  • List images to have them automatically sized to the given "width" of the carousel.
  • Cannot use pipes ("|"), meaning this option does not support captions or setting individual widths for each item.
{{Carousel
|width=300
|images=image 1.png;image 2.png
}}

Parameter list

width Width of the slider. e.g. 450 if the series of images are 450px wide
align To have it float to the right, use floatright. To have it float to the left, use floatleft. To have it centered, use center. To have it without any, use null.
list For every slide, start a new line and put <div class="jcarousel-item">[[File:exampleimage.jpg]]</div>, substituting exampleimage.jpg with the image you desire.
images Shorthand using "images" instead of "list" parameter.

Examples

Using list (image widths can vary and images have captions)

BBTAG
BBCF
BBCP

Icon banner arrow left.png Icon banner arrow right.png


Using images parameter instead of list (all images are the same size and cannot have captions):