Template:Generic cargo compact list: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><div class="generic-cargo-compact-list {{#if:{{{center extra cols|}}}|center-extra-cols}}">{{#cargo_query:tables={{{tables|{{{table|}}}}}} | <includeonly><div class="generic-cargo-compact-list {{#if:{{{center extra cols|}}}|center-extra-cols}}">{{#cargo_query:tables={{{tables|{{{table|}}}}}} | ||
|fields=CONCAT("[[File:", {{{image field|image}}}, "|{{{image size|30px}}}|link=", {{{pagename field|_pageName}}}, "|Image of", {{{name field|name}}}, "]] [[", {{{pagename field|_pageName}}}, "|", {{{name field|name}}}, "]]") = {{{col 1 name|Item}}}<!-- | |fields=CONCAT("[[File:", {{{image field|image}}}, "|{{{image size|30px}}}|link=", {{{pagename field|_pageName}}}, "|Image of", {{{name field|name}}}, "]] ", | ||
IF({{{no link|}}}, "{{{name field|name}}}", "[[", {{{pagename field|_pageName}}}, "|", {{{name field|name}}}, "]]")) = {{{col 1 name|Item}}}<!-- | |||
-->{{#if:{{{extra col 1|}}}|, {{{extra col 1}}}}}<!-- | -->{{#if:{{{extra col 1|}}}|, {{{extra col 1}}}}}<!-- | ||
-->{{#if:{{{extra col 2|}}}|, {{{extra col 2}}}}}<!-- | -->{{#if:{{{extra col 2|}}}|, {{{extra col 2}}}}}<!-- | ||
Revision as of 11:33, 3 December 2025
An alternative to Template:Generic cargo query that takes up less vertical space per row and also displays better on narrow viewports (such as on mobile devices).
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Table(s) | tables table | no description
| String | required |
| link field | link field | no description | Unknown | optional |
| image field | image field | no description | Unknown | optional |
| image size | image size | no description | Unknown | optional |
| name field | name field | no description | Unknown | optional |
| col 1 name | col 1 name | no description | Unknown | optional |
| extra col 1 | extra col 1 | no description | Unknown | optional |
| extra col 2 | extra col 2 | no description | Unknown | optional |
| extra col 3 | extra col 3 | no description | Unknown | optional |
| extra col 4 | extra col 4 | no description | Unknown | optional |
| extra col 5 | extra col 5 | no description | Unknown | optional |
| extra col 6 | extra col 6 | no description | Unknown | optional |
| extra col 7 | extra col 7 | no description | Unknown | optional |
| extra col 8 | extra col 8 | no description | Unknown | optional |
| extra col 9 | extra col 9 | no description | Unknown | optional |
| extra col 10 | extra col 10 | no description | Unknown | optional |
| introduced col game name | introduced col game name | no description | Unknown | optional |
| introduced field | introduced field | no description | Unknown | optional |
| where | where | no description | Unknown | optional |
| order by | order by | no description | Unknown | optional |
| group by | group by | no description | Unknown | optional |
| join on | join on | no description | Unknown | optional |
| limit | limit | no description | Unknown | optional |
| center extra cols | center extra cols | no description | Unknown | optional |
Example usage
{{generic cargo compact list
|table=bcs_cards
|extra col 1=class=Class
|extra col 2=rarity=Rarity
|introduced col game name=Bloons Card Storm
|where=pack="Classic"
|limit=200
|center extra cols=y
}}
Function: CargoSQLQuery::run Query: SELECT `bcs_cards`.`_pageID` AS `cargo_backlink_page_id_bcs_cards`,CONCAT("Image of", name, " ", IF(, "name", "", name, "")) AS `Item`,`class` AS `Class`,`rarity` AS `Rarity`,COALESCE(IF(introduced = "Firstlook test" OR introduced = "Full Playable test", CONCAT("", introduced, ""), CONCAT("Version ", introduced, "")), "Launch") AS `Introduced` FROM `cargo__bcs_cards` `bcs_cards` WHERE pack="Classic" ORDER BY `bcs_cards`.`_pageID`,CONCAT("Image of", name, " ", IF(, "name", "", name, "")),`class`,`rarity`,COALESCE(IF(introduced = "Firstlook test" OR introduced = "Full Playable test", CONCAT("", introduced, ""), CONCAT("Version ", introduced, "")), "Launch") LIMIT 100