Difference between revisions of "Template:Categorizer"

From Twinsuniverse
Jump to: navigation, search
m
Line 15: Line 15:
 
==Syntax==
 
==Syntax==
 
  <nowiki>{{categorizer
 
  <nowiki>{{categorizer
  |category=
+
  |category =
  |catlabel=
+
  |catlabel =
  |article=
+
  |article =
  |label=
+
  |label =
 +
|nocat =
 
}}</nowiki>
 
}}</nowiki>
  
==Common Example==
+
==Examples==
 +
===Common parameters===
 
  <nowiki>{{categorizer
 
  <nowiki>{{categorizer
  |category=Quetches
+
  |category = Quetches
  |article=Quetch
+
  |article = Quetch
 
}}</nowiki>
 
}}</nowiki>
  
Line 30: Line 32:
 
(and the page would be categorized under [[:Category:Quetches]])
 
(and the page would be categorized under [[:Category:Quetches]])
  
==Full Example==
+
===Optional parameters===
 
  <nowiki>{{categorizer
 
  <nowiki>{{categorizer
  |category=Quetches
+
  |category = Quetches
  |catlabel=list members
+
  |catlabel = list members
  |article=Quetch
+
  |article = Quetch
  |label=Men
+
  |label = Men
 
}}</nowiki>
 
}}</nowiki>
  
 
:[[Quetch|Men]] <sup>&#91;[[:Category:Quetches|list members]]&#93;</sup>
 
:[[Quetch|Men]] <sup>&#91;[[:Category:Quetches|list members]]&#93;</sup>
 
(and the page would be categorized under [[:Category:Quetches]])
 
(and the page would be categorized under [[:Category:Quetches]])
 +
 +
===All parameters===
 +
<nowiki>{{categorizer
 +
|category = Quetches
 +
|catlabel = list members
 +
|article = Quetch
 +
|label = Men
 +
|nocat = true
 +
}}</nowiki>
 +
 +
:[[Quetch|Men]] <sup>&#91;[[:Category:Quetches|list members]]&#93;</sup>
 +
(and the page would '''not''' be categorized under [[:Category:Quetches]])
  
 
[[Category:Twinsuniverse - Templates]]</noinclude>
 
[[Category:Twinsuniverse - Templates]]</noinclude>

Revision as of 16:02, 11 November 2012

This template is used to add a tag to an infobox, labeling and automatically categorize the article under a category.

{{categorizer | category = category name | catlabel = link text for categorylink | article = an article about the category | label = link text for article link }}

Parameters

  • category: The target category to add this article to.
  • catlabel: The text to display on the categorylink (defaults to "list all").
  • article: The article that represents the target category (defaults to the label not to become linked).
  • label: The text to display on the link to the article (defaults to the article pagename).
  • nocat: Whether or not to suppress categorization under category (defaults to false, which means auto categorization).

Syntax

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

Examples

Common parameters

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

(and the page would be categorized under Category:Quetches)

Optional parameters

{{categorizer
 |category = Quetches
 |catlabel = list members
 |article = Quetch
 |label = Men
}}
Men [list members]

(and the page would be categorized under Category:Quetches)

All parameters

{{categorizer
 |category = Quetches
 |catlabel = list members
 |article = Quetch
 |label = Men
 |nocat = true
}}
Men [list members]

(and the page would not be categorized under Category:Quetches)