Difference between revisions of "Template:Infobox Template/suppressible"

From Twinsuniverse
Jump to: navigation, search
(new subpage to template-infobox)
 
(another fix)
Line 1: Line 1:
<includeonly>
+
<includeonly>{{#ifeq: {{{ignore|false}}}|false|{{
{{#switch: {{lc:{{{1|}}}}}
+
#switch: {{lc:{{{1|}}}}}
 
| no = {{categorizer|category=Nonsuppressible templates|label=No|nocat={{{nocat|false}}}}}
 
| no = {{categorizer|category=Nonsuppressible templates|label=No|nocat={{{nocat|false}}}}}
 
| yes = {{categorizer|category=Suppressible templates|label=Yes|nocat={{{nocat|false}}}}}
 
| yes = {{categorizer|category=Suppressible templates|label=Yes|nocat={{{nocat|false}}}}}
Line 9: Line 9:
 
     |label=''unknown''
 
     |label=''unknown''
 
     |reason=The '''suppressible''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }}
 
     |reason=The '''suppressible''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }}
}}</includeonly><noinclude>
+
}}|{{categorizer|category=Nonsuppressible templates|display=false|nocat={{{nocat|false}}}}}}}</includeonly><noinclude>
 
This template offers the choice to specify whether another template allows suppression of categorization. It can also automatically categorize the template page under the related category for that suppressibility.
 
This template offers the choice to specify whether another template allows suppression of categorization. It can also automatically categorize the template page under the related category for that suppressibility.
  
Line 18: Line 18:
 
#* ''recursively''
 
#* ''recursively''
 
#* any other (non)empty value defaults to: ''unknown''
 
#* any other (non)empty value defaults to: ''unknown''
 +
* '''ignore''': Whether or not to ignore the suppressibility of the template, if there is no categorization (any value will do, defaults to false)
 
* '''nocat''': Whether or not to suppress categorization of the template page, under the category for the above chosen suppressibility (defaults to false, which means auto categorization).
 
* '''nocat''': Whether or not to suppress categorization of the template page, under the category for the above chosen suppressibility (defaults to false, which means auto categorization).
  
Line 61: Line 62:
  
 
:{{categorizer|category=Templates of unknown suppressibility|label=''unknown''|nocat=true}}
 
:{{categorizer|category=Templates of unknown suppressibility|label=''unknown''|nocat=true}}
 +
 +
 +
Lastly, it is possible to ignore "suppressible" altogether, if the template does not categorize anyway, by using the '''ignore''' parameter, which would not display but categorize under [[:Category:Nonsuppressible templates]] by default:
 +
<nowiki>{{Infobox Template/suppressible|ignore=true}}</nowiki>
 +
<nowiki>{{Infobox Template/suppressible||ignore=true}}</nowiki>
 +
<nowiki>{{Infobox Template/suppressible|I don't know|ignore=yessss}}</nowiki>
  
  

Revision as of 11:20, 4 June 2014

This template offers the choice to specify whether another template allows suppression of categorization. It can also automatically categorize the template page under the related category for that suppressibility.

Parameters

  1. Whether the template allows categorization suppression (no parameter name and value is case insensitive):
    • no
    • yes
    • recursively
    • any other (non)empty value defaults to: unknown
  • ignore: Whether or not to ignore the suppressibility of the template, if there is no categorization (any value will do, defaults to false)
  • nocat: Whether or not to suppress categorization of the template page, under the category for the above chosen suppressibility (defaults to false, which means auto categorization).


Note: eventhough the name of this template implies a default value of "yes", leaving the value empty or out resolves to "unknown" instead.

Syntax

{{Infobox Template/suppressible|value}}

Examples

Common use includes the unnamed parameter with either values "yes" or "no":

{{Infobox Template/suppressible|yes}}
{{Infobox Template/suppressible|no}}
Yes [list all]
No [list all]


The case of the value is not important:

{{Infobox Template/suppressible|YES}}
Yes [list all]


Some templates are "suppressible" but also forward this to all deeper templates in them, for these the suppressibility could specify "recursively", which would display the following:

{{Infobox Template/suppressible|recursively}}
Recursively [list all]


You may leave "suppressible" undefined (which would raise the Templates of unknown suppressibility maintenance task) by not specifying any valid value, so these all have the same result:

{{Infobox Template/suppressible}}
{{Infobox Template/suppressible|}}
{{Infobox Template/suppressible|yeah}}
{{Infobox Template/suppressible|true}}
{{Infobox Template/suppressible|aye, it's traumatized!}}
{{Infobox Template/suppressible|whatever}}
{{Infobox Template/suppressible|nope?}}
{{Infobox Template/suppressible|false}}
{{Infobox Template/suppressible|null}}
{{Infobox Template/suppressible|zero}}
{{Infobox Template/suppressible|not}}
unknown [list all]


Lastly, it is possible to ignore "suppressible" altogether, if the template does not categorize anyway, by using the ignore parameter, which would not display but categorize under Category:Nonsuppressible templates by default:

{{Infobox Template/suppressible|ignore=true}}
{{Infobox Template/suppressible||ignore=true}}
{{Infobox Template/suppressible|I don't know|ignore=yessss}}


The nocat parameter may be used to suppress automatic categorization like this (any value will do):

{{Infobox Template/suppressible|yes|nocat=true}}

This would render the same result as the first example above, but would not automatically categorize under Category:Suppressible templates. This feature works both on valid values and the maintenance task mentioned above.