Template:Generic cargo gallery/doc

Revision as of 06:27, 4 April 2025 by Polavux (talk | contribs) (Created page with "<templatedata> { "params": { "tables": { "aliases": [ "table" ], "label": "Tables", "description": "The Cargo table(s) to use for querying.", "example": "btd6_artifacts", "type": "string", "required": true }, "image field": { "label": "Image field", "description": "The field to use for querying images. If a cargo table has a column named \"icon\", set this to \"icon\" to display the images in that column.", "example": "image_M",...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template for creating a gallery of images using Cargo. (If you're looking at the source code and wondering why this uses templates to create a gallery instead of the built-in "gallery" mode, it's because the gallery mode stops the visual editor from loading in mediawiki v1.43.)

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Tablestables table

The Cargo table(s) to use for querying.

Example
btd6_artifacts
Stringrequired
Image fieldimage field

The field to use for querying images. If a cargo table has a column named "icon", set this to "icon" to display the images in that column.

Default
image
Example
image_M
Stringoptional
Name fieldname field

The field to use for the text to display under the image. If a cargo table has a column named "description", set this to "description" to display the text in that column.

Default
name
Example
name_M
Stringoptional
wherewhere

no description

Unknownoptional
order byorder by

no description

Unknownoptional
limitlimit

no description

Unknownoptional
Widthswidths

The widths of the images.

Default
150px
Example
100px
Stringoptional
Heightsheights

The heights of the images.

Default
150px
Example
100px
Stringoptional
modemode

no description

Unknownoptional

Example usage

{{generic cargo gallery
|table=btd6_artifacts
|where=type != "Boost"
|limit=150
|widths=100px
|heights=100px
}}