Template:ShopTableRow: Difference between revisions
Create ShopTableRow (renamed from ShopRow) (via create-page on MediaWiki MCP Server) |
Use item sprite from Cargo with x2 size like ItemCategoryTable (via update-page on MediaWiki MCP Server) |
||
| Line 1: | Line 1: | ||
<includeonly>{{#cargo_store:_table=ItemSource|item={{{item|{{{1|}}}}}}|source={{{npc|{{{shop|{{PAGENAME}}}}}}}}|source_type=shop|cost={{{cost|}}}|currency={{{currency|Gold}}}}} | <includeonly>{{#cargo_store:_table=ItemSource|item={{{item|{{{1|}}}}}}|source={{{npc|{{{shop|{{PAGENAME}}}}}}}}|source_type=shop|cost={{{cost|}}}|currency={{{currency|Gold}}}}} | ||
|- | |- | ||
| style="text-align:center;" | {{Sprite|{{{item|{{{1|}}}}}}}} | | style="text-align:center; width:64px;" | {{Sprite|{{#cargo_query:tables=Items|fields=sprite|where=name="{{{item|{{{1|}}}}}}"}}|x2|link={{{item|{{{1|}}}}}}}} | ||
| [[{{{item|{{{1|}}}}}}]] | | [[{{{item|{{{1|}}}}}}]] | ||
| data-sort-value="{{{cost|0}}}" | {{Sprite|{{{currency|Gold}}}|x2}} {{{cost|}}}</includeonly><noinclude> | | data-sort-value="{{{cost|0}}}" | {{Sprite|{{{currency|Gold}}}|x2}} {{{cost|}}}</includeonly><noinclude> | ||
Revision as of 13:58, 1 February 2026
This template adds rows to the table "ItemSource", which is declared by the template ItemSource. View table. Stores shop item data to Cargo and outputs a table row. Use with Template:Tl and Template:Tl.
Usage
{{ShopTableHeader}}
{{ShopTableRow|item=Iron Sword|cost=100}}
{{ShopTableRow|item=Health Potion|cost=50|currency=Tokens}}
{{ShopTableFooter}}
Parameters
- item - The item being sold (required)
- cost - The price (required)
- currency - Currency type (defaults to Gold, shown as sprite)
- npc - The NPC selling this item (defaults to page name)