Help:Setting values/Working with the template parameter

added support of the  parameter to the   parser function. The parameter also provides the following fixed named arguments allowing for customized links or queries:CiteRef::gh:smw:756
 * – holds the name of the property used
 * – holds the value assigned to the property used
 * – holds the number of the property value assignments (annotations) made
 * – determines whether the given property value assignment is the last one emitted with the template ( and higher)

The template is applied to the entire, i.e. to "property1" and to "property2", etc. Thus the template "TemplateUsedForEntireSetCall" only needs to be added to the line setting the first property e.g. "propery1". A second template added to e.g. "propery2", etc. will be ignored. If one would like to use a second query one will have to add a second  parser function to the respective page.

Example - "set query"
See this page for an example

Example - restricted characters
Where the in-text annotation using the  syntax, e.g.   does not work due to interference with the parser (value contains square brackets, wiki-links, extra colons), a template e.g. BySetTemplateSimpleValueOutput added to a   call can create an annotation and display the value at the same time.CiteRef::gh:smw:1048CiteRef::gh:smw:1066


 * Result

Example - multiple value display
As of, a  parameter is automatically added to the template allowing to determine if the given value is the last element (= last value) returned via the template (list or query) or not e.g. BySetTemplateSimpleValueOutputMultiple. If the property value is the "last element" (= "last value") returned the parameter's value is "1" and if it is not "0" will be returned.CiteRef::gh:smw:1107


 * Result

Without the  parameter as shown in template BySetTemplateSimpleValueOutputMultipleWithout there would be no way to determine the last element and apply different formatting. Note the trailing comma ",":


 * Result