Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Carousel: Difference between revisions

Template page
No edit summary
No edit summary
 
Line 1: Line 1:
<includeonly><gallery mode="{{{mode|slideshow}}}" widths="{{{width|400}}}px" heights="{{{height|300}}}px">
<includeonly><gallery mode="{{{mode|slideshow}}}" widths="{{{width|400}}}px" heights="{{{height|300}}}px">
{{#if: {{{image1|}}}|File:{{{image1}}}{{#if: {{{caption1|}}}|{{!}}{{{caption1}}}}}|}}
File:{{{image1|}}}
{{#if: {{{image2|}}}|File:{{{image2}}}{{#if: {{{caption2|}}}|{{!}}{{{caption2}}}}}|}}
{{#if:{{{image2|}}}|File:{{{image2}}}}}
{{#if: {{{image3|}}}|File:{{{image3}}}{{#if: {{{caption3|}}}|{{!}}{{{caption3}}}}}|}}
{{#if:{{{image3|}}}|File:{{{image3}}}}}
{{#if: {{{image4|}}}|File:{{{image4}}}{{#if: {{{caption4|}}}|{{!}}{{{caption4}}}}}|}}
{{#if:{{{image4|}}}|File:{{{image4}}}}}
{{#if: {{{image5|}}}|File:{{{image5}}}{{#if: {{{caption5|}}}|{{!}}{{{caption5}}}}}|}}
{{#if:{{{image5|}}}|File:{{{image5}}}}}
{{#if: {{{image6|}}}|File:{{{image6}}}{{#if: {{{caption6|}}}|{{!}}{{{caption6}}}}}|}}
{{#if:{{{image6|}}}|File:{{{image6}}}}}
{{#if: {{{image7|}}}|File:{{{image7}}}{{#if: {{{caption7|}}}|{{!}}{{{caption7}}}}}|}}
{{#if:{{{image7|}}}|File:{{{image7}}}}}
{{#if: {{{image8|}}}|File:{{{image8}}}{{#if: {{{caption8|}}}|{{!}}{{{caption8}}}}}|}}
{{#if:{{{image8|}}}|File:{{{image8}}}}}
{{#if: {{{image9|}}}|File:{{{image9}}}{{#if: {{{caption9|}}}|{{!}}{{{caption9}}}}}|}}
{{#if:{{{image9|}}}|File:{{{image9}}}}}
{{#if: {{{image10|}}}|File:{{{image10}}}{{#if: {{{caption10|}}}|{{!}}{{{caption10}}}}}|}}
{{#if:{{{image10|}}}|File:{{{image10}}}}}
{{#if: {{{image11|}}}|File:{{{image11}}}{{#if: {{{caption11|}}}|{{!}}{{{caption11}}}}}|}}
{{#if:{{{image11|}}}|File:{{{image11}}}}}
{{#if: {{{image12|}}}|File:{{{image12}}}{{#if: {{{caption12|}}}|{{!}}{{{caption12}}}}}|}}
{{#if:{{{image12|}}}|File:{{{image12}}}}}
</gallery>{{#if: {{{header|}}}|
</gallery>{{#if:{{{header|}}}|
<p style="text-align: center; font-size: 18px; font-weight: bold; margin-top: 10px;">{{{header}}}</p>}}{{#if: {{{description|}}}|
<p style="text-align:center; font-size:18px; font-weight:bold; margin-top:10px;">{{{header}}}</p>}}{{#if:{{{description|}}}|
<p style="text-align: center; font-size: 14px; color: #54595d; margin-top: 5px;">{{{description}}}</p>}}</includeonly><noinclude>
<p style="text-align:center; font-size:14px; color:#54595d; margin-top:5px;">{{{description}}}</p>}}</includeonly><noinclude>
{{documentation}}
{{documentation}}


== About ==
== Usage ==
This template uses MediaWiki's built-in gallery feature with slideshow mode. It's compatible with all standard MediaWiki installations.
 
== Gallery Modes ==
* '''slideshow''' - Interactive slideshow with navigation (default)
* '''traditional''' - Classic gallery grid
* '''packed''' - Packed images with justified layout
* '''nolines''' - Gallery without borders
* '''packed-hover''' - Shows captions on hover
 
== Example ==
<pre>
<pre>
{{Carousel
{{Carousel
|mode = slideshow
|width = 500
|width = 500
|height = 350
|height = 350
|mode = slideshow
|image1 = Screenshot1.png
|image1 = Screenshot1.png
|caption1 = Welcome screen
|image2 = Screenshot2.png
|image2 = Screenshot2.png
|caption2 = Main menu
|image3 = Screenshot3.png
|image3 = Screenshot3.png
|caption3 = Gameplay
|header = My Gallery
|header = Game Gallery
|description = Some description text
|description = Screenshots from version 2.0
}}
}}
</pre>
</pre>
== Modes ==
* '''slideshow''' - Slideshow with navigation arrows (default)
* '''traditional''' - Thumbnail grid
* '''packed''' - Justified layout
* '''nolines''' - Grid without borders


<templatedata>
<templatedata>
{
{
"description": "An image carousel/gallery using MediaWiki's native gallery feature. Displays up to 12 images with optional captions in various display modes including slideshow.",
"description": "Image carousel using MediaWiki's native gallery slideshow.",
"params": {
"params": {
"mode": {
"label": "Mode",
"description": "Display mode",
"type": "string",
"default": "slideshow",
"suggestedvalues": ["slideshow", "traditional", "packed", "nolines"]
},
"width": {
"width": {
"label": "Width",
"label": "Width",
"description": "Width of images in pixels",
"type": "number",
"type": "number",
"default": "400"
"default": "400"
Line 56: Line 55:
"height": {
"height": {
"label": "Height",
"label": "Height",
"description": "Height of images in pixels",
"type": "number",
"type": "number",
"default": "300"
"default": "300"
},
},
"mode": {
"image1": { "label": "Image 1", "type": "wiki-file-name", "required": true },
"label": "Display Mode",
"description": "Gallery display mode",
"type": "string",
"suggestedvalues": ["slideshow", "traditional", "packed", "nolines", "packed-hover"],
"default": "slideshow"
},
"image1": {
"label": "Image 1",
"description": "First image filename (without File: prefix)",
"type": "wiki-file-name",
"required": true
},
"caption1": {
"label": "Caption 1",
"description": "Caption for first image",
"type": "string"
},
"image2": { "label": "Image 2", "type": "wiki-file-name" },
"image2": { "label": "Image 2", "type": "wiki-file-name" },
"caption2": { "label": "Caption 2", "type": "string" },
"image3": { "label": "Image 3", "type": "wiki-file-name" },
"image3": { "label": "Image 3", "type": "wiki-file-name" },
"caption3": { "label": "Caption 3", "type": "string" },
"image4": { "label": "Image 4", "type": "wiki-file-name" },
"image4": { "label": "Image 4", "type": "wiki-file-name" },
"caption4": { "label": "Caption 4", "type": "string" },
"image5": { "label": "Image 5", "type": "wiki-file-name" },
"image5": { "label": "Image 5", "type": "wiki-file-name" },
"caption5": { "label": "Caption 5", "type": "string" },
"image6": { "label": "Image 6", "type": "wiki-file-name" },
"image6": { "label": "Image 6", "type": "wiki-file-name" },
"caption6": { "label": "Caption 6", "type": "string" },
"image7": { "label": "Image 7", "type": "wiki-file-name" },
"image7": { "label": "Image 7", "type": "wiki-file-name" },
"caption7": { "label": "Caption 7", "type": "string" },
"image8": { "label": "Image 8", "type": "wiki-file-name" },
"image8": { "label": "Image 8", "type": "wiki-file-name" },
"caption8": { "label": "Caption 8", "type": "string" },
"image9": { "label": "Image 9", "type": "wiki-file-name" },
"image9": { "label": "Image 9", "type": "wiki-file-name" },
"caption9": { "label": "Caption 9", "type": "string" },
"image10": { "label": "Image 10", "type": "wiki-file-name" },
"image10": { "label": "Image 10", "type": "wiki-file-name" },
"caption10": { "label": "Caption 10", "type": "string" },
"image11": { "label": "Image 11", "type": "wiki-file-name" },
"image11": { "label": "Image 11", "type": "wiki-file-name" },
"caption11": { "label": "Caption 11", "type": "string" },
"image12": { "label": "Image 12", "type": "wiki-file-name" },
"image12": { "label": "Image 12", "type": "wiki-file-name" },
"caption12": { "label": "Caption 12", "type": "string" },
"header": { "label": "Header", "type": "string" },
"header": {
"description": { "label": "Description", "type": "string" }
"label": "Header",
"description": "Optional header text below the gallery",
"type": "string"
},
"description": {
"label": "Description",
"description": "Optional description text below the header",
"type": "string"
}
},
},
"paramOrder": [
"width", "height", "mode",
"image1", "caption1", "image2", "caption2", "image3", "caption3",
"image4", "caption4", "image5", "caption5", "image6", "caption6",
"image7", "caption7", "image8", "caption8", "image9", "caption9",
"image10", "caption10", "image11", "caption11", "image12", "caption12",
"header", "description"
],
"format": "block"
"format": "block"
}
}

Latest revision as of 23:44, 24 January 2026


{{Carousel
|mode = slideshow
|width = 500
|height = 350
|image1 = Screenshot1.png
|image2 = Screenshot2.png
|image3 = Screenshot3.png
|header = My Gallery
|description = Some description text
}}
  • slideshow - Slideshow with navigation arrows (default)
  • traditional - Thumbnail grid
  • packed - Justified layout
  • nolines - Grid without borders

Image carousel using MediaWiki's native gallery slideshow.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Modemode

Display mode

Suggested values
slideshow traditional packed nolines
Default
slideshow
Stringoptional
Widthwidth

no description

Default
400
Numberoptional
Heightheight

no description

Default
300
Numberoptional
Image 1image1

no description

Filerequired
Image 2image2

no description

Fileoptional
Image 3image3

no description

Fileoptional
Image 4image4

no description

Fileoptional
Image 5image5

no description

Fileoptional
Image 6image6

no description

Fileoptional
Image 7image7

no description

Fileoptional
Image 8image8

no description

Fileoptional
Image 9image9

no description

Fileoptional
Image 10image10

no description

Fileoptional
Image 11image11

no description

Fileoptional
Image 12image12

no description

Fileoptional
Headerheader

no description

Stringoptional
Descriptiondescription

no description

Stringoptional