Difference between revisions of "StatListBody"
Stratonian (talk | contribs) m (syntax) |
Stratonian (talk | contribs) m (syntax fix + prettier code) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
− | -->{{#vardefine:string | + | -->{{#vardefine:string|{{unlink|{{{1}}}}}}}<!-- remove link from parameter |
− | |||
-->:{{stat<!-- create stat | -->:{{stat<!-- create stat | ||
− | -->|{{ | + | -->|{{#if:1<!-- trick to strip any whitespace from the string |
− | -->|{{# | + | -->|{{#explode:{{#var:string}}|(|0}}}}<!-- get part of string before '(' |
− | -->|link={{ | + | -->|link={{#var:string}}<!-- link to original page |
-->}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude> | -->}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude> |
Revision as of 12:08, 15 August 2023
Description
Creates a body for a Stat list using the parameters provided in the original inline query.
Usage
{{#ask: [[Category:Primary Basket Stats]] |format=template |template=StatListBody }}