Difference between revisions of "Template:LootList"
From Istaria Lexica
(5 intermediate revisions by the same user not shown) | |||
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|}}} | | + | ! style="padding: .2em 15px"|{{#if:{{{headline|}}}|{{{headline}}}|{{PAGENAME}}'s loot:}} |
|- | |- | ||
− | |{{#if: {{{items|}}} | <div style=" | + | |{{#if: {{{items|}}} | <div style="{{column-count|2}} column-gap: 5px">{{#arrayprint:loot|<br/>}}</div> | <center>No entries, yet.</center>}} |
{{InfoboxEnd}} | {{InfoboxEnd}} | ||
− | <noinclude>{{Clr}}{{Documentation}}[[Category: | + | <noinclude>{{Clr}}{{Documentation}}[[Category:Table Templates]]</noinclude> |
Latest revision as of 18:37, 21 October 2022
LootList's loot: |
---|
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 ', ', 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 ', ' (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]] , [[Spider Silk]] , [[Item::Bag of Tulip Bulbs]] , {{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)