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

From Twinsuniverse
Jump to: navigation, search
(new subpage to template-infobox)
 
(added infobox)
 
Line 9: Line 9:
 
     |label=''unspecified''
 
     |label=''unspecified''
 
     |reason=The '''singletag''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }}
 
     |reason=The '''singletag''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }}
}}</includeonly><noinclude>
+
}}</includeonly><noinclude>{{Infobox Template
 +
|purpose=infobox
 +
|singletag=no
 +
|multiline=no
 +
|gamerelated=no
 +
|suppressible=recursively
 +
|choice=single
 +
|cat1=Templates requiring parameters!no
 +
|cat2=Templates with only optional parameters!optional
 +
|cat3=Templates without parameters!yes
 +
|cat4=Templates with unspecified parameters!''unspecified''!maintenance
 +
|var1=
 +
}}
 +
 
 
This template offers the choice to specify whether another template can be called without (optional) parameters. It can also automatically categorize the page of that template under the category for that kind of template.
 
This template offers the choice to specify whether another template can be called without (optional) parameters. It can also automatically categorize the page of that template under the category for that kind of template.
  
Line 65: Line 78:
 
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Templates without parameters]]. 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:Templates without parameters]]. This feature works both on valid values and the maintenance task mentioned above.
  
[[Category:Categorizers|template]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 18:43, 6 June 2014

Infobox Template/singletag
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 can be called without (optional) parameters. It can also automatically categorize the page of that template under the category for that kind of template.

Parameters

  1. Whether the template can be called without parameters (no parameter name and value is case insensitive):
    • no
    • optional
    • yes
    • any other (non)empty value defaults to: unspecified
  • nocat: Whether or not to suppress categorization under the chosen category (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 "unspecified" instead.

Syntax

{{Infobox Template/singletag|value}}

Examples

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

{{Infobox Template/singletag|yes}}
{{Infobox Template/singletag|no}}
{{Infobox Template/singletag|optional}}
Yes [list all]
No [list all]
Optional [list all]


The case of the value is not important:

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


You may leave "singletag" undefined (which would raise the Templates with unspecified parameters maintenance task) by not specifying any valid value, so these all have the same result:

{{Infobox Template/singletag}}
{{Infobox Template/singletag|}}
{{Infobox Template/singletag|yeah}}
{{Infobox Template/singletag|true}}
{{Infobox Template/singletag|aye, it's not engaged!}}
{{Infobox Template/singletag|whatever}}
{{Infobox Template/singletag|nope?}}
{{Infobox Template/singletag|false}}
{{Infobox Template/singletag|null}}
{{Infobox Template/singletag|zero}}
{{Infobox Template/singletag|multiple}}
{{Infobox Template/singletag|not}}
unspecified [list all]


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

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

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