Difference between revisions of "Template:If lang"

From Team Fortress Wiki
Jump to: navigation, search
(simplify)
Line 1: Line 1:
{{#ifeq:{{SUBPAGENAME}}|{{BASEPAGENAME}}|{{{1}}}|{{{2|}}}|}}<noinclude>
+
{{#ifeq:{{SUBPAGENAME}}|{{BASEPAGENAME}}|{{{1|}}}|{{{2|/{{SUBPAGENAME}}}}}|}}<noinclude>
 
* Provides an output if the page in question is a language subpage.
 
* Provides an output if the page in question is a language subpage.
* How it works: if the subpagename is equal to the basepagename (which is the case in English pages) then {{tl|if lang}} will output the contents of {{{1}}}.  
+
* How it works: if the subpagename is equal to the basepagename (which is the case in English pages) then {{tl|if lang}} will output the contents of {{{1}}} (defaults to none).
** If this fails to match, {{tl|if lang}} it will output {{{2}}}.
+
** If this fails to match, {{tl|if lang}} it will output {{{2}}} (defaults to <code><nowiki>/{{SUBPAGENAME}}</nowiki></code>).
  
 
[[Category:Language templates|If lang]]
 
[[Category:Language templates|If lang]]
 
</noinclude>
 
</noinclude>

Revision as of 22:55, 11 August 2010

  • Provides an output if the page in question is a language subpage.
  • How it works: if the subpagename is equal to the basepagename (which is the case in English pages) then {{if lang}} will output the contents of {{{1}}} (defaults to none).
    • If this fails to match, {{if lang}} it will output {{{2}}} (defaults to /{{SUBPAGENAME}}).