Difference between revisions of "Template:PipeTrick"
From AtlasWiki
(removing #es) |
(close parenthesis should have been open paranthesis) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
− | This template | + | This template emulates the "pipe trick", producing a link whose displayed text excludes the namespace (if any), and excludes everything after the first open parenthesis. |
− | + | </noinclude>{{#arraydefine:colonSplit|{{{1}}}|:}}[[{{{1}}}|{{#switch:{{#arraysize:colonSplit}}| 1 = {{#explode:{{{1}}}|(|0}} | #default = {{#explode:{{#arrayindex:colonSplit|1}}|(|0}} }}]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | </noinclude>{{#arraydefine: | + |
Latest revision as of 16:21, 20 October 2015
This template emulates the "pipe trick", producing a link whose displayed text excludes the namespace (if any), and excludes everything after the first open parenthesis. [[{{{1}}}|{{{1}}}]]