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

From Twinsuniverse
Jump to: navigation, search
(another fix)
(added infobox)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{ignore|false}}}|false|{{
+
<includeonly>{{#ifeq: {{{ignore|}}}||{{
 
#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}}}}}
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}} }}
}}|{{categorizer|category=Nonsuppressible templates|display=false|nocat={{{nocat|false}}}}}}}</includeonly><noinclude>
+
}}|{{categorizer|category=Nonsuppressible templates|display=false|nocat={{{nocat|false}}}}}}}</includeonly><noinclude>{{Infobox Template
 +
|purpose=infobox
 +
|singletag=no
 +
|multiline=no
 +
|gamerelated=no
 +
|suppressible=recursively
 +
|choice=single
 +
|cat1=Nonsuppressible templates!no
 +
|cat2=Suppressible templates!yes
 +
|cat3=Recursively suppressible templates!recursively
 +
|cat4=Templates of unknown suppressibility!''unknown''!maintenance
 +
|var1=
 +
}}
 +
 
 
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 31:
 
#* ''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)
+
* '''ignore''': Whether or not to ignore the suppressibility of the template, if there is no categorization (any value will do, defaults to not ignore)
 
* '''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 75: Line 88:
 
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.
 
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.
  
[[Category:Categorizers|template]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:43, 6 June 2014

Infobox Template/suppressible
Purpose

Infobox [list all]

Single tag

No [list all]

Multi-line

No [list all]

Protected

No [list all]

Game related

No [list all]

Categorization
Suppressible

Recursively [list all]

Choice

Single category [list all]

Categories

Multiple: [list all]

Variables
Names

none [list all]

Subpages

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 not ignore)
  • 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.