The template format used to create a tabular output combined with math formats

From semantic-mediawiki.org
(Redirected from The template format used to create a tabular output combined with math formats)
ExamplesExamples/QueriesThe template format used to create a tabular output combined with math formats
Templates for joining output
This page shows an example for the template format used to create a tabular output combined with math formats.
Format
Keywords
Table of Contents

NoteNote:  These examples require Semantic MediaWiki 1.9.2 or newer due to an enhancement to the userparam= parameter.1 See this help page help page for further information.

Example without extra conditionals[edit]

{{#ask:
 [[Category:City]]
 [[Located in::Germany]] 
 |?population
 |?area#km²
 |template=Template/Math/Table
 |introtemplate=Template/Math/Table/Intro
 |outrotemplate=Template/Math/Table/Outro
 |format=template
 |link=none
}}
This produces the following output
City Population Area
Berlin 3,520,061 891.85 km²
Demo:Cologne
Frankfurt 679,664 248.31 km²
Munich 1,353,186 310.43 km²
Stuttgart 606,588 207.36 km²
Demo:Würzburg
Average 0 0
Total 0 0


Example with additional conditionals[edit]

{{#ask:
 [[Category:City]]
 [[Located in::Germany]] 
 |?population
 |?area#km²
 |template=Template/Math/Table
 |introtemplate=Template/Math/Table/Intro
 |outrotemplate=Template/Math/Table/Outro
 |format=template
 |link=none
 |limit=3
 |searchlabel=
}}
This produces the following output
City Population Area
Berlin 3,520,061 891.85 km²
Demo:Cologne
Frankfurt 679,664 248.31 km²
Average 0 0
Total 0 0


Templates used to create the examples[edit]

References

  1. ^  |  Semantic MediaWiki: GitHub pull request gh:smw:217