Help:Ol format

From semantic-mediawiki.org
Jump to: navigation, search
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 by default:info.pngIndicates whether the result format is enabled by default upon installation of the respective extension. yes
Authors: Markus Krötzsch
Categories: misc
Table of Contents

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

Parameter Type Default Description
intro Text empty The text to display before the query results, if there are any
outro Text empty The text to display after the query results, if there are any
default Text empty The text to display if there are no query results
sep Text empty The separator for values
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
columns Whole number 1 The number of columns in which to display results (default is $1)
userparam Text empty A value passed into each template call, if a template is used
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

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

Result:

  1. Berlin (Population 3,391,409 Size in km² 891.85 km²344.343 sqmi)
  2. Frankfurt (Population 679,664 Size in km² 248.31 km²95.872 sqmi)
  3. Munich (Population 1,353,186 Size in km² 310.43 km²119.857 sqmi)
  4. Stuttgart (Population 606,588 Size in km² 207.36 km²80.062 sqmi)



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

Help:Ol format en 0.7


Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox