Difference between revisions of "StatListBody"

m (syntax fix + prettier code)
m (used ambiguate template)
Line 2: Line 2:
 
-->{{#vardefine:string|{{unlink|{{{1}}}}}}}<!-- remove link from parameter
 
-->{{#vardefine:string|{{unlink|{{{1}}}}}}}<!-- remove link from parameter
 
-->:{{stat<!-- create stat
 
-->:{{stat<!-- create stat
-->|{{#if:1<!-- trick to strip any whitespace from the string
+
-->|{{ambiguate|{{#var:string}}}}<!-- removes any disambiguation from the page title
-->|{{#explode:{{#var:string}}|(|0}}}}<!-- get part of string before '('
 
 
-->|link={{#var:string}}<!-- link to original page
 
-->|link={{#var:string}}<!-- link to original page
 
-->}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude>
 
-->}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude>

Revision as of 13:36, 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
}}