Template:Categorizer

From Twinsuniverse
Revision as of 23:08, 10 December 2012 by J McKalling (Talk | contribs)

Jump to: navigation, search

This template is used to add a header to an infobox, tagging it's articles and automatically categorizing them under a category.

All display of this template is done by the {{Categorylink}}, and may be turned off altogether to categorize articles only.

Parameters

  • category: The category name to use for the Template:Categorylink and categorization (case sensitive, mandatory)
  • catlabel, article and label: Additional parameters for the Template:Categorylink.
  • display: Whether or not to display the categorylink (case insensitive, defaults to true)
  • nocat: Whether or not to suppress categorization under category (defaults to false, which means auto categorization).

Syntax

{{categorizer
 |category=
 |catlabel=
 |article=
 |label=
 |display=
 |nocat=
}}

Examples

For explanation of the above first four parameters, see the Categorylink template.

You may remove the display of the categorylink by specifying the "false" value for the display parameter, so these all have the same result (nothing displayed):

{{categorizer
 |category=Quetch characters
 |catlabel=This text is simply ignored
 |article=As is the article
 |label=Forget the label
 |display=false
}}
{{categorizer|category=Quetch characters|catlabel=|article=|label=|display=false}}
{{categorizer|category=Quetch characters|display=false}}

Note that adding the value "true" to the nocat parameter to any of the above examples results in exactly the same as not calling this template.

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

{{categorizer
 |category=Quetches
 |article=Quetch
 |nocat=true
}}
Quetch [list all]

This would prevent the page from being categorized under Category:Quetches, which is useful if you only want to render the categorylink without categorization, and if using the Categorylink directly is not desired/possible (i.e. when calling this template indirectly).