Difference between revisions of "Template:Categorizer"
J McKalling (Talk | contribs) m |
J McKalling (Talk | contribs) m |
||
Line 5: | Line 5: | ||
| {{#vardefine: infobox_messages | {{#var: infobox_messages|}}[[Category:{{{category}}}]]}} | | {{#vardefine: infobox_messages | {{#var: infobox_messages|}}[[Category:{{{category}}}]]}} | ||
| [[Category:{{{category}}}]] }} }}}}{{ | | [[Category:{{{category}}}]] }} }}}}{{ | ||
− | #ifeq: {{lc:{{{display|true}}}}} | | + | #ifeq: {{lc:{{{display|true}}}}} | true |
+ | |{{categorylink | ||
+ | |category={{{category|}}} | ||
+ | |catlabel={{{catlabel|}}} | ||
+ | |article={{{article|}}} | ||
+ | |label={{{label|{{{article|}}}}}}}} }}{{ | ||
+ | #ifeq: {{lc:{{{display|true}}}}} | infobox | ||
|{{categorylink | |{{categorylink | ||
|category={{{category|}}} | |category={{{category|}}} | ||
Line 49: | Line 55: | ||
<nowiki>{{categorizer|category=Quetch characters|catlabel=|article=|label=|display=false}}</nowiki> | <nowiki>{{categorizer|category=Quetch characters|catlabel=|article=|label=|display=false}}</nowiki> | ||
<nowiki>{{categorizer|category=Quetch characters|display=false}}</nowiki> | <nowiki>{{categorizer|category=Quetch characters|display=false}}</nowiki> | ||
+ | |||
+ | {{sectstub}} | ||
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. | 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. |
Revision as of 09:45, 16 December 2012
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)
- true: the categorylink will be displayed where this template was called, and the categorizer link placed near to it (default)
- infobox: the categorylink will be displayed where this template was called, but the infobox on the page will handle the categorizer link
- emptyinfobox: no categorylink will be displayed, and the infobox on the page will handle the categorizer link
- false: no categorylink will be displayed, but the categorizer link where this template was called
- 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}}
This section is a stub [list all]. You can help the Twinsuniverse by expanding it. |
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 }}
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).