Template:TableUnnamedArgsConditionLimitFooter

From Linux Web Expert

This is a demo template used in connection with demonstrating the template parameter allowing to add the #querylimit variable to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements)..

Note that this example also uses the #expr parser function provided by extension ParserFunctions as well as the formatnum parser function provided by MediaWiki itself for the purpose of formatting the results.

Code

 ! style="text-align: right" | Average
 ! style="text-align: right" | {{formatnum: {{#expr: {{formatnum: {{#ask: {{{#querycondition}}} |?Population |format=average |limit={{{#querylimit}}} }} |R }} round 0 }} }}
 ! style="text-align: right" | {{formatnum: {{#expr: {{formatnum: {{#ask: {{{#querycondition}}} |?Area |format=average |limit={{{#querylimit}}} }} |R }} round 2 }} }} km²
 |-
 ! style="text-align: right" | Total
 ! style="text-align: right" | {{formatnum: {{#expr: {{formatnum: {{#ask: {{{#querycondition}}} |?Population |format=sum |limit={{{#querylimit}}} }} |R }} round 0 }} }}
 ! style="text-align: right" | {{formatnum: {{#expr: {{formatnum: {{#ask: {{{#querycondition}}} |?Area |format=sum |limit={{{#querylimit}}} }} |R }} round 2 }} }} km²
|}

See also