Template:Item icon: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 7: | Line 7: | ||
|format=list}} | |format=list}} | ||
|{{{size|40}}} | |{{{size|40}}} | ||
}} {{#if:{{{show_name|}}}|[[{{{show_name}}]]}}</onlyinclude></includeonly><noinclude> | }} {{#if:{{{show_name|}}}|[[{{{show_name}}}]]}}</onlyinclude></includeonly><noinclude> | ||
<!-- Cargo table definition --> | <!-- Cargo table definition --> |
Revision as of 22:22, 31 August 2023
This template defines the table "item_icon". View table.
This template fetches an icon for an item using Cargo. It also declares the Cargo table for the "item_icon" table that stores this information. The information is uploaded using the standard item descriptions.
Usage:{{ItemIcon |name=the name of the icon page |size=(optional) the size of the icon |show_name=(optional) Whether to show the name. Any value will show the name of the item as a link. Omit to hide it. }}
Examples:
[[File:Function: CargoSQLQuery::run Query: SELECT `cargo__item_icon`.`_pageID` AS `cargo_backlink_page_id_item_icon`,`icon` AS `icon` FROM `cargo__item_icon` WHERE `cargo__item_icon`.`name`=Potion of Healing ORDER BY `cargo__item_icon`.`_pageID`,`icon` LIMIT 100
Function: CargoSQLQuery::run Query: SELECT `cargo__item_icon`.`_pageID` AS `cargo_backlink_page_id_item_icon`,`icon` AS `icon` FROM `cargo__item_icon` WHERE `cargo__item_icon`.`name`=Potion of Healing ORDER BY `cargo__item_icon`.`_pageID`,`icon` LIMIT 100
|class=bg3wiki-icon ]][[File:
Function: CargoSQLQuery::run Query: SELECT `cargo__item_icon`.`_pageID` AS `cargo_backlink_page_id_item_icon`,`icon` AS `icon` FROM `cargo__item_icon` WHERE `cargo__item_icon`.`name`=Potion of Healing ORDER BY `cargo__item_icon`.`_pageID`,`icon` LIMIT 100
Function: CargoSQLQuery::run Query: SELECT `cargo__item_icon`.`_pageID` AS `cargo_backlink_page_id_item_icon`,`icon` AS `icon` FROM `cargo__item_icon` WHERE `cargo__item_icon`.`name`=Potion of Healing ORDER BY `cargo__item_icon`.`_pageID`,`icon` LIMIT 100
|class=bg3wiki-icon ]][[File:
Function: CargoSQLQuery::run Query: SELECT `cargo__item_icon`.`_pageID` AS `cargo_backlink_page_id_item_icon`,`icon` AS `icon` FROM `cargo__item_icon` WHERE `cargo__item_icon`.`name`=Potion of Healing ORDER BY `cargo__item_icon`.`_pageID`,`icon` LIMIT 100
Function: CargoSQLQuery::run Query: SELECT `cargo__item_icon`.`_pageID` AS `cargo_backlink_page_id_item_icon`,`icon` AS `icon` FROM `cargo__item_icon` WHERE `cargo__item_icon`.`name`=Potion of Healing ORDER BY `cargo__item_icon`.`_pageID`,`icon` LIMIT 100
|class=bg3wiki-icon ]] true
Copy-ready example (no item name): {{ItemIcon|name=}}
Copy-ready example (with item name): {{ItemIcon|name=|show_name=true}}