Template:Generic cargo gallery: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
this hacky stuff isn't necessary anymore |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly>{{#cargo_query:tables={{{tables|{{{table|}}}}}} | ||
|fields={{{image field|image}}}=image, _pageName, {{{name field|name}}}=name | |fields={{{image field|image}}}=image, _pageName, {{{name field|name}}}=name, CONCAT("[[", _pageName, "|", {{{name field|name}}}, "]]")=Text | ||
|where ={{{where|}}} | |where ={{{where|}}} | ||
| Line 6: | Line 6: | ||
|limit ={{{limit|100}}} | |limit ={{{limit|100}}} | ||
|format = | |format =gallery | ||
| | |caption field=Text | ||
| | |link field =_pageName | ||
| | |alt field=Text | ||
|show bytes =0 | |||
|show dimensions=0 | |||
|show filename =0 | |||
|mode={{{mode|traditional}}} | |||
|image width={{{widths|100px}}} | |||
|image height={{{heights|100px}}} | |||
}}</includeonly><noinclude>{{/doc}}</noinclude> | |||
Revision as of 02:29, 5 April 2026
Template for creating a gallery of images using Cargo.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Tables | tables table | The Cargo table(s) to use for querying.
| String | required |
| Image field | image 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.
| String | optional |
| Name field | name 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.
| String | optional |
| where | where | no description | Unknown | optional |
| order by | order by | no description | Unknown | optional |
| limit | limit | no description | Unknown | optional |
| Widths | widths | The widths of the images.
| String | optional |
| Heights | heights | The heights of the images.
| String | optional |
| mode | mode | no description | Unknown | optional |
Example usage
{{generic cargo gallery
|table=btd6_artifacts
|where=type != "Boost"
|limit=150
|widths=100px
|heights=100px
}}