Help:Plainlist format – variable #rownumber

From Linux Web Expert

Variable #rownumberProperty "Has name" (as page type) with input value "Variable #rownumber" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.
This help page explains how to add rownumbers to a template.
Keywords

This help page explains the usage of the #rownumber variable when using templates with 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). to display the output of your queries. It was introduced with Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki.1

This variable can only be used in templates defined with parameter template. It starts from 1 and takes an offset into account.

Example

Syntax
{{#ask:
 [[Category:City]]
 [[Located in::Germany]]
 |?Population
 |?Area
 |format=plainlist
 |introtemplate=TableUnnamedArgsRownumberHeader
 |template=TableUnnamedArgsRownumberBody
 |outrotemplate=TableFooter
}}
Result

The templates used to create this example: TableUnnamedArgsRownumberHeader, TableUnnamedArgsRownumberBody and TableFooter. The variable was added to template "TableUnnamedArgsRownumberBody" specified with parameter template.

Note
  • The variable is added to the template like, e.g. {{{#rownumber}}}. Prior to Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki like, e.g. {{{#}}}.
  • This variable starts to increment rownumbers at value 1 for all results matching the query condition not just the ones displayed, i.e. limiting the results with parameter limit or offset does not change the rownumbers displayed.

See also

References

  1. ^ gh:smw:3130