Template:Tlg: Difference between revisions

From Skulepedia
Jump to navigation Jump to search
w:en>Patrick87
(usage without first parameter wasn't possible on pages in the template namespace (+simplification))
w:en>Patrick87
(handle empty but specified first parameter)
Line 20: Line 20:
         |:
         |:
         |{{FULLPAGENAME:{{{1}}}}} <!-- if yes: link to article ns or assume other valid link, e.g. Interwikilink -->
         |{{FULLPAGENAME:{{{1}}}}} <!-- if yes: link to article ns or assume other valid link, e.g. Interwikilink -->
         |{{#switch:{{NAMESPACE:{{{1|{{FULLPAGENAME}}}}}}}  
         |{{#switch:{{NAMESPACE:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}}}
             |{{ns:0}}={{ns:10}}:{{PAGENAME:{{{1|{{PAGENAME}}}}}}} <!-- No ns given: we want to link to template ns -->
             |{{ns:0}}={{ns:10}}:{{#if:{{{1|}}}|{{PAGENAME:{{{1}}}}}|{{PAGENAME}}}} <!-- No ns given: we want to link to template ns -->
             |#default={{FULLPAGENAME:{{{1|{{FULLPAGENAME}}}}}}}<!--
             |#default={{#if:{{{1|}}}|{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME}}}}<!--
       -->}}<!--
       -->}}<!--
     -->}}{{!}}<!-- <<--- pipe character in link
     -->}}{{!}}<!-- <<--- pipe character in link
Line 31: Line 31:
-->{{#if:{{{braceinside|}}}|<nowiki>{{</nowiki>}}<!--
-->{{#if:{{{braceinside|}}}|<nowiki>{{</nowiki>}}<!--
   -- surface text of link
   -- surface text of link
-->{{{alttext|{{{1|{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|{{PAGENAME}}|{{FULLPAGENAME}}}}}}}}}}<!--
-->{{{alttext|{{#if:{{{1|}}}|{{{1}}}|{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|{{PAGENAME}}|{{FULLPAGENAME}}}}}}}}}<!--
   -- closing brace if braceinside=yes
   -- closing brace if braceinside=yes
-->{{#if:{{{braceinside|}}}|<nowiki>}}</nowiki>}}<!--
-->{{#if:{{{braceinside|}}}|<nowiki>}}</nowiki>}}<!--

Revision as of 11:37, 19 May 2013

{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}