Difference between revisions of "Template:SplitCategory"
From Biowikifarm Metawiki
(Created page with '<includeonly>[[{{ns:category}}:{{#replace:{{#replace:{{{1}}}|,|{{SplitCategory/Delimiter}}}}|\|}}]]</includeonly><noinclude>{{Documentation}} </noinclude>') |
|||
Line 1: | Line 1: | ||
− | <includeonly>[[{{ns:category}}:{{#replace:{{#replace:{{{1}}}|,|{{SplitCategory/Delimiter}}}}|\|}}]]</includeonly><noinclude>{{Documentation}} | + | <includeonly>[[{{ns:category}}:{{#replace:{{#replace:{{#replace:{{{1}}}|{{{3|&}}}|{{{2|,}}}}}|{{{2|,}}}|{{SplitCategory/Delimiter}}}}|\|}}]]</includeonly><noinclude>{{Documentation}} |
− | </noinclude> | + | [[Category:Single-access key templates]]</noinclude> |
Latest revision as of 16:58, 13 July 2010
[edit] Template documentation
USAGE
{{SplitCategory|CatOne, CatTwo & CatThree|,|&}}
… creates, independently of the wiki language (i.e. working under en, de, etc.):
[[Category:CatOne]] [[Category:CatTwo]] [[Category:CatThree]]
Technical Note: The function uses a #replace: parser function, but the replacement text ]] [[{{ns:category}}: must be "hidden" inside a second template (Template:SplitCategory/Delimiter). Without this trick the brackets will not result in valid links, due to some cleanup/sanitizer code present in the parser.
See also Template:SplitLink.