Help:Plainlist format – variable #rowcount

From Linux Web Expert

Variable #rowcountProperty "Has name" (as page type) with input value "Variable #rowcount" 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 a rowcount to a template.
Keywords

This help page explains the usage of the #rowcount 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 is passed to the templates defined with the parameters template, introtemplate and outrotemplate.

Example

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

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

Note
  • The variable is added to the template like, e.g. {{{#rowcount}}}.
  • Usually this variable is added to the template specified with parameter introtemplate or parameter outrotemplate.
  • This variable counts 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 count displayed.

See also

References

  1. ^ gh:smw:3130