Examples on working with the #set "separator" parameter

From semantic-mediawiki.org
Jump to: navigation, search
Help:Setting values using #setWorking with the #set "separator" parameterExamples on working with the #set "separator" parameter
"separator" parameter to #set
This page describes the "seperator" parameter to the "#set" parser function.
Keywords
Table of Contents

Semantic MediaWiki 1.9.0 introduced the |+sep=... parameter to the #set parser function. This page shows examples for using many different separators allowing to split annotations.

Example

{{#set:
 |has set test 1=Example 1;Example 2;Example 3;Example 4|+sep=;
 |has set test 2=More examples
 |has set test 3=12+22+3+4+5+6+7+8+9+10|+sep=+
 |has set test 4=In between example
 |has set test 5=123,1234,12345,|+sep=
 |has set test 6=One,or,two,more,examples|+sep
 |has set test 6=Last example
 |has set test 7=Pipe1|Pipe2|Pipe3
}}
Result

For details and verification, see the property assignments to the different "Has set test" properties on special page Special:Browse for this page.

Documentation

See also this page for more documentation on using separators with the #set parser function.