Help:Ol format

From semantic-mediawiki.org
Ol format
Numbered list, with additional outputs shown in parentheses
Further Information
Provided by: Semantic MediaWiki
Added: 0.7
Removed: still supported
Requirements: none
Format name: ol
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. yes
Authors: Markus Krötzsch
Categories: misc
Table of Contents
This page has not yet be updated to reflect the changes brought with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..1

The result format ol is very similar to the result formats list and ul and is used to format query results as numbered lists.

Parameters[edit]

Parameter Type Default Description
propsep text , The separator between the properties of a result entry
valuesep text , The separator between the values for a property of a result
template text empty The name of a template with which to display the printouts
named args yes/no no Name the arguments passed to the template
userparam text empty A value passed into each template call, if a template is used
class text empty An additional CSS class to set for the list
introtemplate text empty The name of a template to display before the query results, if there are any
outrotemplate text empty The name of a template to display after the query results, if there are any

The use of templates for formatting is explained in Help:Template format.

Example[edit]

{{#ask: [[Category:City]] [[located in::Germany]] 
| ?population
| ?area#km² = Size in km²
| format=ol
}}

Result:

  1. Berlin (PopulationThe number of inhabitants of some geographical place.: 3,520,061, Size in km²: 891.85 km²344.34 sqmi
    )
  2. Cologne
  3. Frankfurt (PopulationThe number of inhabitants of some geographical place.: 679,664, Size in km²: 248.31 km²95.87 sqmi
    )
  4. Munich (PopulationThe number of inhabitants of some geographical place.: 1,353,186, Size in km²: 310.43 km²119.86 sqmi
    )
  5. Stuttgart (PopulationThe number of inhabitants of some geographical place.: 606,588, Size in km²: 207.36 km²80.06 sqmi
    )
  6. Würzburg



This documentation page applies to all SMW versions from 0.7 to the most current version.
      Other languages: defrzh-hans


References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:3130