Difference between revisions of "Template:Talk other"

From Chevy Wiki
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
Line 1: Line 1:
<noinclude>{{Template sandbox notice}}
{{#switch:
</noinclude>{{mbox
   <!--If no or empty "demospace" parameter then detect namespace-->
| demospace = {{{demospace|}}}
  {{#if:{{{demospace|}}}  
| type = style
  | {{lc: {{{demospace}}} }}   <!--Use lower case "demospace"-->
| image = [[Image:Symbol opinion vote.svg|40px]]
  | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
| text =
    | talk
  {{#if:{{{new|{{{2|}}} }}}
    | other
   | <!-- New usage (with or without date)
    }}  
    -->The template {{[[Template:{{{1}}}|{{{1}}}]]}} is deprecated. Please use {{{new|{{[[Template:{{{2}}}|{{{2}}}]]{{#if:{{{3|}}}
    | <nowiki>|</nowiki>{{{3}}}
    }}}} }}} instead.
  | <!-- Old usage (deprecated, being switched)
    -->The template {{[[Template:{{PAGENAME}}|{{PAGENAME}}]]}} is [[:Category:Deprecated templates|deprecated]]. Please use {{{use|{{[[Template:{{{1}}}|{{{1}}}]]}}}}} instead. <br> <small>This usage is deprecated. Please replace it with <nowiki>{{tdeprecated|</nowiki>{{PAGENAME}}<nowiki>|</nowiki>{{{1}}}<nowiki>}}</nowiki>.</small> <includeonly>{{{category|[[Category:Deprecated use of tdeprecated]]}}}</includeonly>
   }}
   }}
}}<includeonly>{{{category|{{#ifeq:{{ARTICLESPACE}}|Template
| talk    = {{{1|}}}
| {{#if:{{{date|}}}
| other
  | [[Category:Templates deprecated since {{{date}}}|{{PAGENAME}}]]
| #default = {{{2|}}}
  | [[Category:Deprecated templates|{{PAGENAME}}]]
}}<!--End switch--><noinclude>
  }}
| [[Category:Pages using deprecated templates]]
}} }}}</includeonly><noinclude>
 
 
== Testing ==
 
Testing this box here. You need to {{purge|purge this page}} to see any changes you have done.
 
<pre>
{{tdeprecated/sandbox}}
</pre>
{{tdeprecated/sandbox}}
 
<pre>
{{tdeprecated/sandbox|new}}
</pre>
{{tdeprecated/sandbox|new}}
 
<pre>
{{tdeprecated/sandbox|old|new}}
{{tdeprecated/sandbox|old|new|parameter}}
{{tdeprecated/sandbox|old|new|&lt;nowiki&gt;parameter|fuu&lt;/nowiki&gt;}}
</pre>
{{tdeprecated/sandbox|old|new}}
{{tdeprecated/sandbox|old|new|parameter}}
{{tdeprecated/sandbox|old|new|<nowiki>parameter|fuu</nowiki>}}
 
<pre>
{{tdeprecated/sandbox|old|new|date=August 2008}}
</pre>
{{tdeprecated/sandbox|old|new|date=August 2008}}
 


{{pp-template|small=yes}}
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Latest revision as of 15:00, 3 February 2009


[edit] Template-info.svg Template documentation

This is the {{talk other}} meta-template.

It helps other templates detect what type of page they are on.

Basic usage

This template usually takes two parameters, like this:

{{talk other | Talk pages text | Other pages text }}

If the template is on any talk page, it will return this:

Talk pages text

If the template is on any other page, it will return this:

Other pages text

A typical usage case could be to make it so that a template only adds a category when on a talk page. Thus not adding other pages that just show the template to the category. Like this:

{{talk other | [[Category:Some talk page category]] }}

Or to warn that a template should not be used on other pages:

{{talk other | | This template should only be used on talk pages. }}

Note that in the first case above the "other" parameter was not used, and in the second example the "talk" parameter was left empty.

Advanced usage

This template works like {{main talk other}}, see full documentation there. It detects pages like "Talk:", "User talk:", "Wikipedia talk:" and so on as type talk. The test parameter demospace for this template understands the values talk and other.

See also

Easy to use namespace-detection templates: