Difference between revisions of "Template:NameTrick"

From AtlasWiki
Jump to: navigation, search
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
This template emulates the "pipe trick", but items in parenthesis are retained.
 
This template emulates the "pipe trick", but items in parenthesis are retained.
</noinclude>{{#arraydefine:colonSplit|{{{1}}}|:}}[[{{{1}}}|{{#switch:{{#arraysize:colonSplit}}| 1 = {{{1}}} | #default = {{#ifeq:{{#arrayindex:colonSplit|0}}|XCSG|{{#arrayindex:colonSplit|1}}|{{{1}}}}}}}]]
+
</noinclude>{{#arraydefine:colonSplit|{{{1}}}|:}}[[{{{1}}}|{{#switch:{{#arraysize:colonSplit}}| 1 = {{{1}}} | #default = {{#ifeq:{{#arrayindex:colonSplit|0}}|"XCSG"|{{#arrayindex:colonSplit|1}}|{{{1}}}}}}}]]

Revision as of 16:40, 23 October 2015

This template emulates the "pipe trick", but items in parenthesis are retained. [[{{{1}}}|{{{1}}}]]