Help:Plainlist format – variable #querycondition

From Linux Web Expert

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

This help page explains the usage of the #querycondition 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 1.9.2Released on an unknown date unknown versions of MediaWiki.1

The content to be added to the query on the template as the #querycondition variable equals the query condition used to select the pages for the output of the query specifying the template.

Example

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

The templates used to create this example: TableUnnamedArgsHeader, TableUnnamedArgsBody and TableUnnamedArgsConditionFooter.

Note
  • The variable is added to the template with {{{#querycondition}}}. Prior to Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki like, e.g. {{{smw-resultquerycondition}}} .
  • The query condition in the above example is: [[Category:City]] [[Located in::Germany]] [[Area::+]] [[Population::+]].

See also

References

  1. ^ gh:smw:217