Difference between revisions of "Template:Infobox Character/magical"

From Twinsuniverse
Jump to: navigation, search
m
m
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
{{#switch: {{lc:{{{1|yes}}}}}
+
{{#switch: {{lc:{{{1|no}}}}}
 
| no = {{categorizer|category=Nonmagical Characters|label=No|nocat={{{nocat|false}}}}}
 
| no = {{categorizer|category=Nonmagical Characters|label=No|nocat={{{nocat|false}}}}}
 
| {{categorizer|category=Magical Characters|label=Yes|nocat={{{nocat|false}}}}}
 
| {{categorizer|category=Magical Characters|label=Yes|nocat={{{nocat|false}}}}}
Line 9: Line 9:
 
* Whether or not magical (no parameter name and values are case insensitive):
 
* Whether or not magical (no parameter name and values are case insensitive):
 
*# ''no''
 
*# ''no''
*# any other (non)empty value defaults to: ''yes''
+
*# any other empty and non-empty value defaults to: ''yes''
 +
*# leaving this value out defaults to: ''no''
 
* '''nocat''': Whether or not to suppress categorization under the magical category (defaults to false, which means auto categorization).
 
* '''nocat''': Whether or not to suppress categorization under the magical category (defaults to false, which means auto categorization).
  
Line 28: Line 29:
  
  
You may even leave out the argument, which will default to yes like this:
+
You may even leave out the argument, which will default to no like this:
 
  <nowiki>{{magical}}</nowiki>
 
  <nowiki>{{magical}}</nowiki>
 +
 +
:{{categorizer|category=Nonmagical Characters|label=No|nocat=true}}
 +
 +
 +
Using the empty value however, defaults to yes instead:
 +
<nowiki>{{magical|}}</nowiki>
  
 
:{{categorizer|category=Magical Characters|label=Yes|nocat=true}}
 
:{{categorizer|category=Magical Characters|label=Yes|nocat=true}}

Revision as of 00:44, 22 November 2012

This template offers the choice to define the magical category of a (character) article. It can also automatically categorize a page under that category.

Parameters

  • Whether or not magical (no parameter name and values are case insensitive):
    1. no
    2. any other empty and non-empty value defaults to: yes
    3. leaving this value out defaults to: no
  • nocat: Whether or not to suppress categorization under the magical category (defaults to false, which means auto categorization).

Syntax

{{magical|value}}

Examples

The template may be used like this:

{{magical|yes}}
Yes [list all]


Or this:

{{magical|no}}
No [list all]


You may even leave out the argument, which will default to no like this:

{{magical}}
No [list all]


Using the empty value however, defaults to yes instead:

{{magical|}}
Yes [list all]


The case of the value is not important:

{{magical|NO}}
No [list all]


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

{{magical|yes|nocat=true}}

(this would render the same result as the first example above, but would not automatically categorize under Category:Magical Characters)