Status: | effective |
Progress: | 100% |
Version: | 3.0.0+ |
Help:Plainlist format – variable #userparam
Variable #userparam Property "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 withuserparam=<value>
.
See also
- Help page on using templates
- Help page on parameter
userparam
- Help page on parameter
template
- Help page on parameter
introtemplate
- Help page on parameter
outrotemplate