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
handle empty but specified first parameter
(usage without first parameter wasn't possible on pages in the template namespace (+simplification))
(handle empty but specified first parameter)
Line 20:
|:
|{{FULLPAGENAME:{{{1}}}}} <!-- if yes: link to article ns or assume other valid link, e.g. Interwikilink -->
|{{#switch:{{NAMESPACE:{{#if:{{{1|}}}|{{FULLPAGENAME{1}}}|{{FULLPAGENAME}}}}}}
|{{ns:0}}={{ns:10}}:{{PAGENAME#if:{{{1|}}}|{{PAGENAME:{{{1}}}}}|{{PAGENAME}}}} <!-- No ns given: we want to link to template ns -->
|#default={{FULLPAGENAME#if:{{{1|}}}|{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME}}}}<!--
-->}}<!--
-->}}{{!}}<!-- <<--- pipe character in link
Line 31:
-->{{#if:{{{braceinside|}}}|<nowiki>{{</nowiki>}}<!--
-- surface text of link
-->{{{alttext|{{#if:{{{1|}}}|{{{1}}}|{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|{{PAGENAME}}|{{FULLPAGENAME}}}}}}}}}}<!--
-- closing brace if braceinside=yes
-->{{#if:{{{braceinside|}}}|<nowiki>}}</nowiki>}}<!--
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu