Help:Plainlist format – variable #userparam

From Linux Web Expert

Variable #userparamProperty "Has name" (as page type) with input value "Variable #userparam" 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 user defined variable to a template.
Keywords

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

Since Semantic MediaWiki 1.9.2Released on an unknown date unknown versions of MediaWiki, this parameter does not just apply to the template parameter but also to the introtemplate parmeter and the outrotemplate parameter.2

The value to be added to the template as the #userparam variable is added to the query by specifying it using the userparam parameter with userparam=<value>. Note the difference between the parameter and the variable.

Example

Syntax
{{#ask:
 [[Category:City]]
 [[Located in::Germany]]
 [[Area::+]]
 [[Population::+]] 
 |?Population
 |?Area
 |format=plainlist
 |template=TableUserparam
 |userparam=have their home on a total of
}}
Result

The template used to create this example: TableUserparam.

Note
  • A value specified by the variable, e.g. {{{#userparam|sometext}}}, is being overridden by the value specified with userparam=<value>.

See also

References

  1. ^ mw:phab:T16440 
  2. ^ gh:smw:217