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

From Twinsuniverse
Jump to: navigation, search
m (Examples)
m (Examples)
Line 34: Line 34:
 
  <nowiki>{{magical|whatever}}</nowiki>
 
  <nowiki>{{magical|whatever}}</nowiki>
 
  <nowiki>{{magical|nope?}}</nowiki>
 
  <nowiki>{{magical|nope?}}</nowiki>
 +
<nowiki>{{magical|false}}</nowiki>
 +
<nowiki>{{magical|null}}</nowiki>
 +
<nowiki>{{magical|zero}}</nowiki>
 +
<nowiki>{{magical|powerless}}</nowiki>
 +
<nowiki>{{magical|not}}</nowiki>
  
 
:{{categorizer|category=Magical Characters|label=Yes|nocat=true}}
 
:{{categorizer|category=Magical Characters|label=Yes|nocat=true}}

Revision as of 22:22, 24 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 value is case insensitive):
    1. no
    2. any other (non)empty value defaults to: yes
  • nocat: Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization).


Note: the parameter is optional, it is only really needed to be able to specify the negative value.

Syntax

{{magical|value}}

Examples

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

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


It doesn't matter which value you use, any value other than "no" will express a positive value, even if you leave it out altogether, so these all have the same result:

{{magical}}
{{magical|}}
{{magical|yes}}
{{magical|aye, it's magic!}}
{{magical|whatever}}
{{magical|nope?}}
{{magical|false}}
{{magical|null}}
{{magical|zero}}
{{magical|powerless}}
{{magical|not}}
Yes [list all]


The only way to express a negative value is by specifying "no" (case insensitive), so these both have the same result:

{{magical|no}}
{{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. This feature works on all valid values.