User:Lady Elyssa/Templates/Template:Skill fact query
From Guild Wars 2 Wiki
Jump to navigationJump to search
Derived from:
- https://wiki.gw2.org.cn/wiki/Special:RunQuery/Skill_fact_query
- https://wiki.gw2.org.cn/index.php?title=Property%3AHas+skill+context&limit=20&offset=0&filter=Weapon
Example[edit]
Define our Query where:
- Profession = Warrior
- Elite =
- Skill Type / Context = Utility
- Boon = Fury
{{#vardefine:COREQUERY|{{#ask:[[Is for profession::{{#var:profession}}]] [[Category:{{#var:context}} skills]][[Has specialization sort order::0]][[Has subobject.Has fact::{{#var:boon}}]]}}}}
}}
To view the initial Query Result (not used within the actual template, used here as a demonstration example.
{{#var: COREQUERY}}
Unformatted Result: Banner of Discipline, Banner of Discipline (underwater), "For Great Justice!"
Break our query result down and organise for display
Arraymap using our COREQUERY:
{{#arraymap: {{#var: COREQUERY}}
|, <!-- Seperate our Data by the (,) Delimeter -->
|@@@ <!-- temporary string variable -->
|* {{#var: context}}: @@@ <!-- Cycle through each piece of data stored in variable -->
|\n <!-- Add newline to end of data segment -->
|
}}
Formatted Result:
- Utility: Banner of Discipline
- Utility: Banner of Discipline (underwater)
- Utility: "For Great Justice!"