Template:ItemBox: Difference between revisions

From Melvor Idle
(Amend category to return 'None' if no category is found)
(Added expansion icon to the top of the page.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ItemBox|Topaz}}
{{ItemBox|Linden Logs}}


Based on [[Template:Item]], but pulling data from [[Module:Items/data]] filtered through [[Module:Items]]
Based on [[Template:Item]], but pulling data through [[Module:Items]]


<onlyinclude><includeonly>{{#vardefine:item|{{{1|{{PAGENAME}}}}}}}{| class="wikitable"  style="float:right; clear:right; max-width:250px; margin-left:10px"
<onlyinclude><includeonly>{| class="wikitable infobox"
|-  
|-  
! {{#var:item}}
! {{#invoke:Items|getExpansionIcon|{{{1|{{PAGENAME}}}}}}}{{{1|{{PAGENAME}}}}}
|-
|-
|style="text-align:center;"| {{#invoke:Icons|Icon|{{#var:item}}|type=item|size=250|notext=true}}
|style="text-align:center;"| {{#invoke:Icons|Icon|{{{1|{{PAGENAME}}}}}|type=item|size=250|notext=true}}
|-
|-
| style="text-align: center;" | {{#invoke:Items|getItemStat|{{#var:item}}|description}}
| style="text-align: center;" | {{#invoke:Items|getItemStat|{{{1|{{PAGENAME}}}}}|description}}
|-
|-
| '''Item ID:''' {{#invoke:Items|getItemStat|{{#var:item}}|id}}
| '''Item ID:''' {{#invoke:Items|getItemStat|{{{1|{{PAGENAME}}}}}|id}}
|-
|-
| '''Category:''' {{#ifeq:{{#invoke:Items|getItemStat|{{#var:item}}|category}}||None|[[{{#invoke:Items|getItemStat|{{#var:item}}|category}}]]}}
| '''Category:''' {{#ifeq:{{#invoke:Items|getItemStat|{{{1|{{PAGENAME}}}}}|category}}||None|[[{{#invoke:Items|getItemStat|{{{1|{{PAGENAME}}}}}|category}}]]}}
|-
|-
| '''Type:''' {{#invoke:Items|getItemStat|{{#var:item}}|type}}
| '''Type:''' {{#invoke:Items|getItemStat|{{{1|{{PAGENAME}}}}}|type}}
|-
|-
| '''Sells For:''' {{Icon|Coins|notext=true}} {{#invoke:Items|getItemStat|{{#var:item}}|sellsFor|formatNum=true}}{{#invoke:Items|getOtherItemBoxText|{{#var:item}}}}
| '''Sells For:''' {{Icon|Coins|notext=true}} {{#invoke:Items|getItemStat|{{{1|{{PAGENAME}}}}}|sellsFor|formatNum=true}}{{#invoke:Items|getOtherItemBoxText|{{{1|{{PAGENAME}}}}}}}
|-
|-
| '''Item Sources:'''<br/>{{#invoke:Items/SourceTables|getItemSources|{{#var:item}}|asList=true|addCategories=true}}
| '''Item Sources:'''<br/>{{#invoke:Items/SourceTables|getItemSources|{{{1|{{PAGENAME}}}}}|asList=true|addCategories=true}}
|-
|-
| '''Item Uses:'''<br/>{{#invoke:Items/UseTables|getItemUses|{{#var:item}}|addCategories=true}}
| '''Item Uses:'''<br/>{{#invoke:Items/UseTables|getItemUses|{{{1|{{PAGENAME}}}}}|addCategories=true}}
|-
|-
| '''Part of 100% Completion''': {{#invoke:Items|getItemStat|{{#var:item}}|completionReq}}
| '''Part of 100% Completion''': {{#invoke:Items|getItemStat|{{{1|{{PAGENAME}}}}}|completionReq}}
|}{{#invoke:Items|getItemCategories|{{#var:item}}}}
|}{{#invoke:Items|getItemCategories|{{{1|{{PAGENAME}}}}}}}
</includeonly></onlyinclude>
</includeonly></onlyinclude>

Latest revision as of 15:10, 8 November 2022

Linden Logs
Linden Logs
No Description
Item ID: melvorTotH:Linden_Logs
Category: Woodcutting
Type: Logs
Sells For: 485
Item Sources:
  • Woodcutting Level 108
Item Uses:
Part of 100% Completion: Yes


Based on Template:Item, but pulling data through Module:Items