User:Relyk/SMW

From Guild Wars 2 Wiki
Jump to navigationJump to search

Management[edit]

Projects[edit]

Skill table[edit]

Weapon skills[edit]

Vendor table[edit]

Skill table[edit]

Item gallery[edit]

Event[edit]

Skill icon[edit]

Renown heart[edit]

Recipe[edit]

Recipe tree table[edit]

Achievement table[edit]

NPC[edit]

Skill fact[edit]

Weapon sets[edit]

Infobox[edit]

Dye[edit]

Location tree[edit]

Notes[edit]

Parsing[edit]

Can't use the {{!}} trick to avoid parsing incorrectly. You have to supply the pipe and use the if statement to bring the parameter.

{{#ask:[[Category:Guardian skills]] [[Is for weapon::Greatsword]]
|?Has canonical name
{{#if: y | {{!}}?Is for weapon}}
}}

Binding Blade, Leap of Faith, Pull (guardian skill), Strike, Symbol of Resolution, Vengeful Strike, Whirling Wrath, Wrathful Strike

{{#ask:[[Category:Guardian skills]] [[Is for weapon::Greatsword]]
|?Has canonical name
|{{#if: y |?Is for weapon}}
}}
 Has canonical nameIs for weapon
Binding BladeBinding BladeGreatsword
Leap of FaithLeap of FaithGreatsword
Pull (guardian skill)PullGreatsword
StrikeStrikeGreatsword
Symbol of ResolutionSymbol of ResolutionGreatsword
Vengeful StrikeVengeful StrikeGreatsword
Whirling WrathWhirling WrathGreatsword
Wrathful StrikeWrathful StrikeGreatsword

Template parameters[edit]

{{Event icon|[[Has event icon::swords]]}}

Templates do not like SMW in their parameters. Just because you are setting a string type for a semantic property does not mean it's a string yet in parsing. You have to use #set, which you should be doing anyways.

{{Event icon|swords}} {{#set:Has event icon=swords}}

Template format[edit]

Even if the property is not set for a particular article, the query will pass an empty parameter to the formatting template. You need to check if the parameter is empty before you pass it to any templates because using a default value won't work, the parameter will exist but as an empty value rather than not existing at all.

Null values in queries[edit]

Queries will occasionally return null values for properties for one reason or another. This means that the correct property was found on the page, but a value for the property wasn't found. A query will not display the default if this happens, so it may not be immediately obvious. You can verify this by asking for a particular property with a query, then checking the page itself to see if the property is there. Care should be taken with query formatting templates to check for this to assist in troubleshooting easily. Ask ishmael for a solution if anything goes wrong, it usually works.--Relyk ~ talk > 20:56, 3 May 2013 (UTC)