User:Faltout/SandBox/Named item set display

Usage

 * name is mandatory and is the name of the set. If the items that are part of the set are to be displayed, the name must be case sensitive.
 * display is mandatory and can have the values page, tablerow and popup. The default display is tablerow
 * page is to display the effect in a page of its own with sections, long description and long item listings.
 * tablerow is to display the effect as part of a table's row. It displays 3 cells with the name (and an anchor to the name), the links to the items that are part of the set and the long description.
 * popup displays a pop-up with the short description.
 * long is the long description of the set's effects. The parameter is optional.
 * short is the short description of the set's effects to be displayed in pop-ups. The parameter is optional.
 * extra items should contain any special items or crafting system that are not detected automatically as part of the set. In order for the items of the set to be automatically detected, they need to be in the "Item:" namespace, call the Named item template and be in the category "Category: set items".
 * source page is used to create a link to the page containing the definition of the item set. If left empty or non-existent, the name of the item set will not be linked.

CODE
{{#if: {{{name|}}} | {{#vardefine: defined set name | {{{name}}} }}{{#if: {{{source page|}}} | {{#vardefine: linked set name | }}}#{{{name|}}}|{{{name|}}} }} | {{#vardefine: linked set name | {{{name|}}} }} }}{{#vardefine: display | {{#if: {{{display|}}} | {{{display}}} | tablerow}} }}{{#switch: {{lc:{{#var:display|}}}}

| tablerow|table|row|table row = {{!}} style="height:100%;" {{!}}  {{#var:linked set name}} {{!}} {{#if: {{{extra items|}}} | Extra: {{{extra items|}}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Waist items|mode=userformat|include=-|noresultsfooter=No results}} | | Belts: {{#dpl: |category={{#var: defined set name|}} set items&Waist items |uses=Template:Named item |include={Named item}:picdesc |listseparators=,{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}},}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Feet items|mode=userformat|include=-|noresultsfooter=No results}} | | Boots: {{#dpl: |category={{#var: defined set name|}} set items&Feet items |uses=Template:Named item |include={Named item}:picdesc |listseparators=,{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}},}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Wrist items|mode=userformat|include=-|noresultsfooter=No results}} | | Bracers: {{#dpl: |category={{#var: defined set name|}} set items&Wrist items |uses=Template:Named item |include={Named item}:picdesc |listseparators=,{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Back items|mode=userformat|include=-|noresultsfooter=No results}} | | Cloaks: {{#dpl: |category={{#var: defined set name|}} set items&Back items |uses=Template:Named item |include={Named item}:picdesc |listseparators=,{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Hand items|mode=userformat|include=-|noresultsfooter=No results}} | | Gloves: {{#dpl: |category={{#var: defined set name|}} set items&Hand items |uses=Template:Named item |include={Named item}:picdesc |listseparators=,{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Eye items|mode=userformat|include=-|noresultsfooter=No results}} | | Goggles: {{#dpl: |category={{#var: defined set name|}} set items&Eye items |uses=Template:Named item |include={Named item}:picdesc |listseparators=,{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Head items|mode=userformat|include=-|noresultsfooter=No results}} | | Helms: {{#dpl: |category={{#var: defined set name|}} set items&Head items |uses=Template:Named item |include={Named item}:picdesc |listseparators=,{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Neck items|mode=userformat|include=-|noresultsfooter=No results}} | | Necklaces: {{#dpl: |category={{#var: defined set name|}} set items&Neck items |uses=Template:Named item |include={Named item}:picdesc |listseparators=,{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Finger items|mode=userformat|include=-|noresultsfooter=No results}} | | Rings: {{#dpl: |category={{#var: defined set name|}} set items&Finger items |uses=Template:Named item |include={Named item}:picdesc |listseparators=<ul>,<li>{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Trinket items|mode=userformat|include=-|noresultsfooter=No results}} | | <li>Trinkets: {{#dpl: |category={{#var: defined set name|}} set items&Trinket items |uses=Template:Named item |include={Named item}:picdesc |listseparators=<ul>,<li>{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&*Armor|mode=userformat|include=-|noresultsfooter=No results}} | | <li>Armors: {{#dpl: |category={{#var: defined set name|}} set items&*Armor |uses=Template:Named item |include={Named item}:picdesc |listseparators=<ul>,<li>{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items |category=*Shields¦Rune Arms |mode=userformat|include=-|noresultsfooter=No results}} | | <li>Offhand: {{#dpl: |category={{#var: defined set name|}} set items |category=*Shields¦Rune Arms |uses=Template:Named item |include={Named item}:picdesc |listseparators=<ul>,<li>{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&**Weapons |notcategory=Rune Arms |mode=userformat|include=-|noresultsfooter=No results}} | | <li>Weapons: {{#dpl: |category={{#var: defined set name|}} set items&**Weapons |notcategory=Rune Arms |uses=Template:Named item |include={Named item}:picdesc |listseparators=<ul>,<li>{{Item{{!}}%TITLE%}}{{sup|({{Image popup{{!}}pic{{!}},}})}}</li>,</ul>}} }}</ul> {{!}} {{#if: {{{long|}}} | {{{long}}} | {{#if: {{{short|}}} | {{{short}}} | {{#if: {{{source page|}}} | No description found. Please follow the name link and add a description. | No description }}          }}       }}

| page = {{Anchor| {{{name|}}} }} {{#var:linked set name|}} is an item set.

Items
{{#if: {{{extra items|}}} |

Extra
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Waist items|mode=userformat|include=-|noresultsfooter=No results}} | |

Belts
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Feet items|mode=userformat|include=-|noresultsfooter=No results}} | |

Boots
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Wrist items|mode=userformat|include=-|noresultsfooter=No results}} | |

Bracers
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Back items|mode=userformat|include=-|noresultsfooter=No results}} | |

Cloaks
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Hand items|mode=userformat|include=-|noresultsfooter=No results}} | |

Gloves
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Eye items|mode=userformat|include=-|noresultsfooter=No results}} | |

Goggles
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Head items|mode=userformat|include=-|noresultsfooter=No results}} | |

Helms
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Neck items|mode=userformat|include=-|noresultsfooter=No results}} | |

Necklaces
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Finger items|mode=userformat|include=-|noresultsfooter=No results}} | |

Rings
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&Trinket items|mode=userformat|include=-|noresultsfooter=No results}} | |

Trinkets
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&*Armor|mode=userformat|include=-|noresultsfooter=No results}} | |

Armor
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items|category=*Shields¦Rune Arms|mode=userformat|include=-|noresultsfooter=No results}} | |

Offhand
}}{{#if: {{#dpl:|category={{#var:defined set name|}} set items&**Weapons |notcategory=Rune Arms |mode=userformat|include=-|noresultsfooter=No results}} | |

Weapons
}}

| popup|pop-up =

| #default= }} | }}