Template:Template link general: Difference between revisions
From Mariopedia, a wiki on Mario, Yoshi, Wario, Donkey Kong, Super Smash Bros., and more!
Jump to navigationJump to search
Content deleted Content added
Allow empty parameters to be specified (whatever this is good for). At least it simplifies documentation. |
Update linking logic so "anypage" is not needed anymore; remove unused and undocumented LANG and SISTER parameters |
||
Line 3:
<span style="white-space:nowrap;">
--><!--
-- begin tt style if tt=yes or code=yes given
-->{{#if:{{{tt|}}}{{{code|}}}|<code>}}<!--
Line 11 ⟶ 12:
-- begin boldface if bold=yes given
-->{{#if:{{{bold|}}}|'''}}<!--
-->{{#if:{{{nolink|}}}
▲ -- specify page to link to (unless nolink=yes)
|<!-- nolink=yes -->
|{{#ifeq:{{padleft:|1|{{{1}}}}} <!-- check whether we have a colon at the beginning -->
|:
|{{!(}}{{!(}}:{{FULLPAGENAME:{{{1}}}}} <!-- if yes: link to article ns or assume other valid link, e.g. Interwikilink -->
|{{!(}}{{!(}}:{{#switch:{{NAMESPACE:{{{1}}}}}
|{{ns:0}}|{{ns:10}}={{ns:10}}:{{PAGENAME:{{{1}}}}} <!-- No ns given: we want to link to template ns -->
|#default={{FULLPAGENAME:{{{1}}}}}<!--
-->}}<!--
-->}}{{!}}<!-- <<--- pipe character in link
-->}}<!--
-- create link text
-- opening brace if braceinside=yes
-->{{#if:{{{braceinside|}}}|<nowiki>{{</nowiki>}}<!--
Line 23 ⟶ 35:
-- end of link, unless nolink=yes
-->{{#if:{{{nolink|}}}||]]}}<!--
-- end boldface if bold=yes given
-->{{#if:{{{bold|}}}|'''}}<!--
-- begin italic style if italic=yes given
-->{{#if:{{{italic|}}}|<span style="font-style: italic;">}}<!--
-->{{#ifeq:{{{2|}}}|{{{2|x}}}||{{{2}}}}}<!--
-->{{#ifeq:{{{3|}}}|{{{3|x}}}||{{{3}}}}}<!--
Line 39 ⟶ 53:
-->{{#ifeq:{{{11|}}}|{{{11|x}}}||{{{11}}}}}<!--
-->{{#if:{{{12|}}}||''...''}}<!--
-- end italic style if italic=yes given
-->{{#if:{{{italic|}}}|</span>}}<!--
|