This template is protected from editing.

Difference between revisions of "Template:Lang cat"

From Team Fortress Wiki
Jump to: navigation, search
m (fix)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#switch:{{lc:{{{namespace-overrride|{{NAMESPACE}}}}}}}<!--
+
{{#if:{{{1|}}}
 +
| {{#switch:{{lc:{{{namespace-overrride|{{NAMESPACE}}}}}}}<!--
  
 
     // Blacklist certain namespaces from being placed in categories. -->
 
     // Blacklist certain namespaces from being placed in categories. -->
  
   | user  
+
   | user
 
   | team fortress wiki
 
   | team fortress wiki
 
   | user talk
 
   | user talk
Line 21: Line 22:
 
   | blank
 
   | blank
 
   | none
 
   | none
   | #default = [[Category:{{{1}}}{{if lang}}|{{#if:{{{sort|}}}
+
   | #default = [[Category:{{{1}}}{{if lang}}{{#if:{{{sort|}}}|{{!}}{{{sort|{{BASEPAGENAME}}}}}|<!--No sort specified-->}}]]<!--  
    | {{{sort|{{BASEPAGENAME}}}}}
+
  -->}}
    | {{#ifeq:{{{1}}} | {{BASEPAGENAME}}<!-- // If the category matches the base, use a space character as the sort key. -->
+
}}<noinclude>{{doc begin}}
      | &#32;
 
      | {{BASEPAGENAME}}<!--                // Otherwise just use the page's name. -->
 
      }}
 
    }}]]<!--  
 
  -->}}<noinclude>{{doc begin}}
 
 
{{tl|lang cat}} places pages in their correct language category. It should only be used directly on [[:Category:Templates|templates]].
 
{{tl|lang cat}} places pages in their correct language category. It should only be used directly on [[:Category:Templates|templates]].
  
Line 34: Line 30:
 
* On [[Scattergun]], {{tlx|lang cat|Scout}} will add the page to [[:Category:Scout]]
 
* On [[Scattergun]], {{tlx|lang cat|Scout}} will add the page to [[:Category:Scout]]
 
* On [[Scattergun/fr]], {{tlx|lang cat|Scout}} will add the page to [[:Category:Scout/fr]]
 
* On [[Scattergun/fr]], {{tlx|lang cat|Scout}} will add the page to [[:Category:Scout/fr]]
* On [[Scout]], {{tlx|lang cat|Scout}} will add the page to [[:Category:Scout]], but will use a space character as the sort key so it appears first in the category listing
+
* On [[Scout]], {{tlx|lang cat|Scout|3=sort= &amp;nbsp;}} will add the page to [[:Category:Scout]], but will use a space character as the sort key so it appears first in the category listing.<br />Note: The space before the &amp;nbsp; tag is important.
  
 
'''Advanced usage'''
 
'''Advanced usage'''

Latest revision as of 20:02, 29 April 2013

Documentation for Lang cat

{{lang cat}} places pages in their correct language category. It should only be used directly on templates.

Usage

Advanced usage

  • By default {{lang cat}} will ignore any Talk page or page in the User or Team Fortress Wiki namespace. However, this can be overriden for specific instances by setting the parameter namespace-override to true.
  • A specific sort-key can also be defined with the parameter sort. Keep in mind that using this parameter will use the specified sortkey for every page that the template is used on.