Template:SplitCategory

From KeyToNature
Jump to: navigation, search
[edit] [purge] Template-info.svg Template documentation

Usage

Note: the version on Key to Nature is used by [[Template:Metadata in addition to Template:Key Start and contains DIFFERENT, MORE COMPLEX PROGRAMMING!

Comma (or semicolon) separated

The Template:SplitCategory assumes to get a colon-separated input as default…

{{SplitCategory|one, two, three}}

…and creates categories dependending on the language…

[[Category:one]] [[Category:two]] [[Category:three]] 

If “print = true”…

{{SplitCategory | one, two, three | print=true}}

…“one, two, three” is printed additionally right where the template is used.

If just “replace sep for print = ,• ” is specified…

{{SplitCategory | one, two, three | replace sep for print = ,• }}

…a replacment is done and it looks nicely like “one • two • three”.

Semicolon and comma

If just “replace sep for print 1 = ;• andreplace sep for print 2 = ,• ” is specified…

{{SplitCategory | one, two; three | replace sep for print 1= ;• | replace sep for print 2= ,• }}

…a replacment is done and it looks nicely like “one • two • three”. Beware of the order: first ‘;’ and then ‘,’ is the recommended order, because   contains a semicolon!