Difference between revisions of "Related"

(removed format parameter, uniform formatting)
(added passive talents to related template)
Line 1: Line 1:
<includeonly>{{#vardefine:related|<!-- SkillListTable format
+
<includeonly>{{#vardefine:category|{{ucfirst:{{#lc:{{{1}}}}}}}}}<!-- define category variable
-->{{#ask: [[Category:{{ucfirst:{{lc:{{{1}}}}}}}]]<!-- get pages in corresponding category
+
-->{{#vardefine:related|<!-- define related pages
--> [[Has stat::{{{2}}}]]<!-- get pages with corresponding stat -->
+
-->{{#switch:{{#var:category}}
 +
|Skills=<!-- Category:Skills
 +
-->{{#ask: [[Category:{{#var:category}}]]<!-- get pages in corresponding category
 +
-->{{#ifeq:{{{2|}}}|{{{2}}}<!-- if second parameter exists
 +
-->|[[Has stat::{{{2}}}]]}}<!-- only get pages with corresponding stat -->
 
| ?Has icon
 
| ?Has icon
 
| ?Has skill name
 
| ?Has skill name
Line 18: Line 22:
 
| introtemplate=SkillListTableHeader
 
| introtemplate=SkillListTableHeader
 
| outrotemplate=SkillListTableFooter
 
| outrotemplate=SkillListTableFooter
 +
}}
 +
|Passive talents=<!-- Category:Passive talents
 +
-->{{#ask: [[Category:{{#var:category}}]]<!-- get pages in corresponding category
 +
-->{{#ifeq:{{{2|}}}|{{{2}}}<!-- if second parameter exists
 +
-->|[[Has stat::{{{2}}}]]}}<!-- only get pages with corresponding stat -->
 +
| ?Has stat
 +
| ?Has stat value
 +
| sort=Has stat
 +
| order=asc
 
}}}}}}
 
}}}}}}
 
{{#if:{{#var:related}}<!-- if related pages exist
 
{{#if:{{#var:related}}<!-- if related pages exist

Revision as of 18:10, 11 August 2023

Description

Displays a stylized list of all pages in the specified categories that contain the specified Stat.

Usage

{{Related|<category/categories>|<stat>|<notext=notext>}}

Parameters

Arrow.png1: The categories to query.
Required.
Notes: Comma separated, can be skills or passive talents
Arrow.png2: The stat to query.
Required.
Arrow.pngnotext: Whether or not to include descriptor text.
Optional.
Notes: If not set, the following text will display:
==Related==
The following can affect (or are affected by) a character's {{{2}}}.

[For each category, a stylized list and accompanying subheading will display.]

Errors

Invalid category. Check documentation.