ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Categ

From ModEnc
Revision as of 06:16, 14 April 2008 by DCoder (talk | contribs) (added "dont use outside $conditions" note)
Jump to navigation Jump to search

This template turns the text into a category link and adds the page to that category. Intented to be used inside Flag template to autolink the page to certain subsets of Category:INI_Flags. Usage:

{{Categ|Example}}

will create a link to Category:Example_Flags titled Example and add the page to that category.

{{Categ|Example|SmartName}}

will create a link to Category:Example_Flags titled SmartName and add the page to that category.
Note: certain categories are named slightly differently than the rest - e.g., categ|Warheads and Category:Warhead_Flags (not Warheads_Flags like categ|InfantryTypes and Category:InfantryTypes_Flags is). Now the template will silently drop the last letter of the category name if that yields an existing category and not doing so wouldn't. In short, previously you would have needed Categ|Warhead|Warheads to make it work properly, now it does so automagically.
Note #2: this template is intended to be used in the Flag Template, Applicable To field. Do not use it elsewhere unless you know what you're doing.