Difference between revisions of "Template:LootList"

From Istaria Lexica

Line 1: Line 1:
 
{{#if: {{{items|}}} |{{#arraydefine:loot|{{{items}}}|/, /|unique,sort=asc}} }}
 
{{#if: {{{items|}}} |{{#arraydefine:loot|{{{items}}}|/, /|unique,sort=asc}} }}
 
{{InfoboxStart|style=float: none; margin: 10px 0px; width: fit-content}}
 
{{InfoboxStart|style=float: none; margin: 10px 0px; width: fit-content}}
{{#if:{{{headline|}}} | ! {{{headline}}} | ! {{PAGENAME}}'s loot:}}
+
! style="padding 0px 10px"|{{#if:{{{headline|}}}|{{{headline}}}|{{PAGENAME}}'s loot:}}
 
|-
 
|-
 
|{{#if: {{{items|}}} | <div style="{{column-count|2}} column-gap: 10px">{{#arrayprint:loot|<br/>}}</div> | <center>No entries, yet.</center>}}
 
|{{#if: {{{items|}}} | <div style="{{column-count|2}} column-gap: 10px">{{#arrayprint:loot|<br/>}}</div> | <center>No entries, yet.</center>}}
 
{{InfoboxEnd}}
 
{{InfoboxEnd}}
 
<noinclude>{{Clr}}{{Documentation}}[[Category:LootList templates]]</noinclude>
 
<noinclude>{{Clr}}{{Documentation}}[[Category:LootList templates]]</noinclude>

Revision as of 15:09, 13 October 2022

LootList's loot:
No entries, yet.
Template documentation (for the template shown above, sometimes hidden or invisible)

Description[edit]

Enlists provided loot in a fancy box.

  • Try out this template in your sandbox
  • Find pages using this template
  • Note: If you want to use Template:InfoboxMultiproperty you are not allowed to nest it with each other. This results in a messed up SMW property list.
  • Duplicate list entries will be removed automatically.

Syntax[edit]

{{LootList|headline=|items=item1, item2, ...}}

Parameters[edit]

{{LootList
|headline = optional headline text for the box
|items    = Items to be shown. Must be encapsulated with preceding ',&nbsp;', which
            signals the template to create a new entry into the list.
}}

Example[edit]

  • 1st entry of items: A simple article name
  • 2nd entry of items: Preceding new list entry, triggered with ',&nbsp;' (A comma followed by a coded white space)
  • 3rd entry of items: Add an SMW property (Item) to the article link
  • 4th entry if items: use Template:InfoboxMultiproperty for multiple SMW entries
{{LootList
|headline = Test Example
|items    = [[Elemental Residue]]
,&nbsp;[[Spider Silk]]
,&nbsp;[[Item::Bag of Tulip Bulbs]]
,&nbsp;{{InfoboxMultiproperty|property=Item|Bag of Sunflower Seeds|Algedian Silver Bar|Amulet of the Tribunal
}} }}
Visit Template:LootList/doc to edit this text. (How to: document correctly)