Template:ArmorTable: Difference between revisions
(added references to dpl3 manual and included note on use of logical OR) |
(added tight-list to css classes for formatting and added to the examples) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><onlyinclude><!-- | <includeonly><onlyinclude><!-- | ||
-->{{#dpl: | -->{{#if:{{{collapse|}}}|<div class="mw-collapsible {{#switch: {{{collapse}}}|expanded=|collapsed=mw-collapsed|#default=mw-collapsed}}"><br>|}} | ||
{{#dpl: | |||
|category = {{{cat1}}} | |category = {{{cat1}}} | ||
|category = {{{cat2|}}} | |category = {{{cat2|}}} | ||
Line 14: | Line 15: | ||
|title = {{{title6|}}} | |title = {{{title6|}}} | ||
|count = {{{count|}}} | |count = {{{count|}}} | ||
|include={Item | |include={{#if:{{{levelrange|}}}|{Item Statistics}.hidebylevel¦phantom_arg={{{levelrange}}},}}{{#if:{{{tooltip|}}}|{Item Statistics¦Item_Tooltip.dpl}|{Item Statistics}:[[%PAGE%|%TITLE%]]}},{Item Statistics¦ArmorTable.dpl},##Horizon Changes.* | ||
|includematch = {{#if:{{{job|}}}|/jobs\s*=.*\[\[{{{job}}}\]\].*¦jobs\s*=\s*All\sJobs\s*¦(?s)^((?!jobs).)*$/|/.*/}} | |includematch = {{#if:{{{job|}}}|/jobs\s*=.*\[\[{{{job}}}\]\].*¦jobs\s*=\s*All\sJobs\s*¦(?s)^((?!jobs).)*$/|/.*/}} | ||
|table=class=" | |table=class="horizon-table tight-list {{{cssclasses|gear-table}}} sortable",-,Name,Level,Slot,Jobs,Stats,Horizon Changes {{changes}} | ||
|tablesortcol=2 | |tablesortcol={{#if:{{{levelrange|}}}|3|2}} | ||
}}<!-- | }}{{#if:{{{collapse|}}}|</div><br>}}<!-- | ||
--></onlyinclude></includeonly> | --></onlyinclude></includeonly> | ||
==Usage== | ==Usage== | ||
Line 24: | Line 25: | ||
Syntax: | Syntax: | ||
<pre>{{ArmorTable|cat1|...|notcat1|...|title1|...job|count}}</pre> | <pre>{{ArmorTable|cat1|...|notcat1|...|title1|...|job|levelrange|collapse|cssclasses|tooltip|count}}</pre> | ||
*Use cat1, cat2, cat3 to include required categories | *Use cat1, cat2, cat3 to include required categories | ||
Line 31: | Line 32: | ||
*Use title1, title2, ..., title6 to include specific pages | *Use title1, title2, ..., title6 to include specific pages | ||
*Use job to include only gear by job XXX | *Use job to include only gear by job XXX | ||
*Use levelrange to include gear in a given level range. Use a minus to separate min and max level like: ''30-40'' | |||
*Use collapse to make the table collapsible. collapse=collapsed makes it collapsed by default. collapse=expand to make it expanded by default. (collapsed is also the default when entering anything else for the collapse parameter). | |||
*cssclasses can be used to add additional classes to the table. The most common usage here is add a color class to the table. | |||
*use the tooltip parameter to display image tooltips when hovering over the item names. Set to anything to enable, e.g. tooltip=true. | |||
*(The count parameter is mainly used for testing) | *(The count parameter is mainly used for testing) | ||
**Also: count does not work with job parameter since the job parameter seems to filter after generating the list and after the count parameter cropped the list. | **Also: count does not work with job parameter since the job parameter seems to filter after generating the list and after the count parameter cropped the list. | ||
Line 39: | Line 44: | ||
===Example 1=== | ===Example 1=== | ||
Syntax: | Syntax: | ||
<pre>{{ArmorTable|cat1=Artifact Armor | <pre>{{ArmorTable|cat1=Artifact Armor|cat2=Feet|notcat1=White Mage}}</pre> | ||
Will give out all pieces of armor which are categorized as "Artifact Armor" and "Feet" while excluding those, which are categorized as "White Mage". ("All AF Feet except WHM feet") | Will give out all pieces of armor which are categorized as "Artifact Armor" and "Feet" while excluding those, which are categorized as "White Mage". ("All AF Feet except WHM feet") | ||
Line 47: | Line 52: | ||
===Example 2=== | ===Example 2=== | ||
Syntax: | Syntax: | ||
<pre>{{ArmorTable|cat1=Artifact Armor|job=WHM}}</pre> | <pre>{{ArmorTable|cat1=Artifact Armor|job=WHM|cssclasses=gear-table hide-col-4|tooltip=true}}</pre> | ||
Will give out all pieces of armor which are categorized as "Artifact Armor" and have "WHM" (or "all") in their job list. | Will give out all pieces of armor which are categorized as "Artifact Armor" and have "WHM" (or "all") in their job list. Will also display the item image as tooltip when hovering over the name. The css classes give the table the colors of the "gear-table" class as well as hide the fourth column (jobs), e.g. for display in a list about WHM gear where it isn't necessary to show the jobs of each piece. | ||
{{ArmorTable|cat1=Artifact Armor|job=WHM}} | {{ArmorTable|cat1=Artifact Armor|job=WHM|cssclasses=gear-table hide-col-4|tooltip=true}} | ||
===Example 3=== | ===Example 3=== | ||
Syntax: | Syntax: | ||
<pre>{{ArmorTable|cat1=Body|job=BLM}}</pre> | <pre>{{ArmorTable|cat1=Body|job=BLM|levelrange=70-75|collapse=collapsed}}</pre> | ||
Will give out all body pieces equippable by BLM. | Will give out all body pieces equippable by BLM in the level range 70-75 in a collapsible table that is collapsed by default. | ||
{{ArmorTable|cat1=Body|job=BLM}} | {{ArmorTable|cat1=Body|job=BLM|levelrange=70-75|collapse=collapse}} | ||
===Example 4=== | ===Example 4=== | ||
Syntax: | Syntax: | ||
<pre>{{ArmorTable|title1=Evoker's Spats|title2=Evoker's Horn}}</pre> | <pre>{{ArmorTable|title1=Evoker's Spats|title2=Evoker's Horn|cssclasses=jobs-table table-md}}</pre> | ||
Will give out a list of those two specified items | Will give out a list of those two specified items using the css styles of "jobs-table" (for color) and "table-md" (for size). | ||
{{ArmorTable|title1=Evoker's Spats|title2=Evoker's Horn}} | {{ArmorTable|title1=Evoker's Spats|title2=Evoker's Horn|cssclasses=jobs-table table-md}} | ||
==Further Information on dpl3 Usage== | ==Further Information on dpl3 Usage== |
Latest revision as of 14:42, 17 November 2024
Usage
Wrapper Template to generate lists of armor based on categories.
Syntax:
{{ArmorTable|cat1|...|notcat1|...|title1|...|job|levelrange|collapse|cssclasses|tooltip|count}}
- Use cat1, cat2, cat3 to include required categories
- (note: you can use {{!}} to use a logical OR in a category)
- Use notcat1, notcat2, notcat2 to exclude categories
- Use title1, title2, ..., title6 to include specific pages
- Use job to include only gear by job XXX
- Use levelrange to include gear in a given level range. Use a minus to separate min and max level like: 30-40
- Use collapse to make the table collapsible. collapse=collapsed makes it collapsed by default. collapse=expand to make it expanded by default. (collapsed is also the default when entering anything else for the collapse parameter).
- cssclasses can be used to add additional classes to the table. The most common usage here is add a color class to the table.
- use the tooltip parameter to display image tooltips when hovering over the item names. Set to anything to enable, e.g. tooltip=true.
- (The count parameter is mainly used for testing)
- Also: count does not work with job parameter since the job parameter seems to filter after generating the list and after the count parameter cropped the list.
Examples
Some Example tables have been limited to output only 5 items (through the optional parameter count=5) because they serve only as examples. The syntax shown in the examples would generate the full tables.
Example 1
Syntax:
{{ArmorTable|cat1=Artifact Armor|cat2=Feet|notcat1=White Mage}}
Will give out all pieces of armor which are categorized as "Artifact Armor" and "Feet" while excluding those, which are categorized as "White Mage". ("All AF Feet except WHM feet")
Name | Level | Slot | Jobs | Stats | Horizon Changes |
---|---|---|---|---|---|
Gallant Leggings | 52 | Feet | PLD | DEF: 14 HP +15 CHR +5 DEX +2 Shield skill +10 Enhances "Holy Circle" effect |
|
Beast Gaiters | 52 | Feet | BST | DEF: 10 HP +11 CHR +3 Enhances "Reward" effect "Charm" +2 | |
Chaos Sollerets | 52 | Feet | DRK | DEF: 10 HP +15 MND +5 Accuracy +3 Enhances "Arcane Circle" effect |
|
Warlock's Boots | 52 | Feet | RDM | DEF: 13 MP +11 MND +1 INT +1 +10 Shield skill +10 | |
Rogue's Poulaines | 60 | Feet | THF | DEF: 13 HP +12 DEX +3 Increases "Flee" duration "Steal" +2 |
??? |
Example 2
Syntax:
{{ArmorTable|cat1=Artifact Armor|job=WHM|cssclasses=gear-table hide-col-4|tooltip=true}}
Will give out all pieces of armor which are categorized as "Artifact Armor" and have "WHM" (or "all") in their job list. Will also display the item image as tooltip when hovering over the name. The css classes give the table the colors of the "gear-table" class as well as hide the fourth column (jobs), e.g. for display in a list about WHM gear where it isn't necessary to show the jobs of each piece.
Example 3
Syntax:
{{ArmorTable|cat1=Body|job=BLM|levelrange=70-75|collapse=collapsed}}
Will give out all body pieces equippable by BLM in the level range 70-75 in a collapsible table that is collapsed by default.
Example 4
Syntax:
{{ArmorTable|title1=Evoker's Spats|title2=Evoker's Horn|cssclasses=jobs-table table-md}}
Will give out a list of those two specified items using the css styles of "jobs-table" (for color) and "table-md" (for size).
Name | Level | Slot | Jobs | Stats | Horizon Changes |
---|---|---|---|---|---|
Evoker's Spats | 52 | Legs | SMN | DEF: 25 MP +15 Evasion skill +10 Avatar: Enhances accuracy Enmity -2 |
none
|
Evoker's Horn | 60 | Head | SMN | DEF: 15 MP +20 INT +3 Summoning magic skill +5 Avatar: Enmity -3 |
none
|