Template:Gallery box/doc

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
This is the documentation subpage of Template:Gallery box. It contains usage information that is not part of the underlying template.

Template:Gallery box

Creates a collapsible, styled container for displaying image galleries. The box renders collapsed by default and includes a header with an automatically chosen icon based on the category name.

Usage

{{gallery box
| name    = Weapons
| gallery = <gallery>...</gallery>
}}

Parameters

Parameter Description Required
name The display title of the box header. Also controls which icon appears to the left of the title. See Supported names below. Optional
icon The icon to display, if the name is not part of Supported names. Should be in the format filename.png Optional
gallery The content to display inside the collapsible area. Typically a <gallery> block or {{Image Gallery}} call, but any wikitext is accepted. Optional
collapsed Whether the box is collapsed. Will be expanded by default; set to anything to make it collapsed. Optional

Supported names and icons

The name parameter controls an icon that appears to the left of the header title. The following values have a dedicated icon:

name value Icon used
Weapons gladiator's arm icon1.png
Outfits Outfit glamour.png
Accessories earrings slot icon1.png
Any other value No icon displays unless if icon is specified.

Behavior

  • The box uses the MediaWiki mw-collapsible class and is expanded by default.
  • Clicking the header toggles the gallery open or closed.
  • Styles are loaded from Template:Gallery box/styles.css.

Examples

Basic usage with a recognized category name:

{{gallery box
|name=Outfits
|gallery=
<gallery mode=packed heights=400px>
Brand-new Armor of Fending Male.jpeg|[[Brand-new Armor of Fending]]
Brand-new Attire of Maiming Male.jpeg|[[Brand-new Attire of Maiming]]
Brand-new Attire of Casting Male.jpeg|[[Brand-new Attire of Casting]]
</gallery>
}}

gives:

Using a custom name and icon:

{{gallery box
| name    = Seasonal Items
| icon    = seasonal events icon1.png
| gallery = <gallery mode=packed heights=200px>
Dream Hat.jpeg|[[Dream Hat]]
Dream Tunic.jpeg|[[Dream Tunic]]
Dream Boots.jpeg|[[Dream Boots]]
</gallery>
}}

gives:

  Seasonal Items

Using a bulleted list instead of a gallery:

{{gallery box
| name    = Seasonal Items
| icon    = seasonal events icon1.png
| gallery = 
*{{i|Dream Hat}}
*{{i|Dream Tunic}}
*{{i|Dream Boots}}
}}
  Seasonal Items

Adding new icon categories

To add support for a new preset category name, edit the #switch block in the template and add a new case:

| NewCategory = [[File:NewIcon.png|30px|link=]]