మూస:catboiler
Lua error in మాడ్యూల్:category_tree at line 11: This template/module can only be used on pages in the Category: namespace..
- The following documentation is located at Template:catboiler/doc. [edit]
- Note: Please move the documentation subpage to Template:catboiler/documentation.
This template is a helper template for generating category boilerplate templates. It is not meant to be used directly, but is to be used by a more specific template such as {{poscatboiler}}.
Parameters
<small>మార్చు</small>This template and its subtemplates have various parameters which are passed in between them. Most of the subtemplates share a common set:
- {{{temp}}} - The name of the specific template that uses the catboiler system.
- {{{code}}} - The code that specifies what 'owns' the category's contents. This is usually a language code such as en, but it can also be a script code like Latn or the code of a language family.
- {{{label}}} - A name for the thing that is being categorised. How the label is interpreted depends on the label subtemplate's properties, and it could be anything at all in theory. This name is used internally, and is also used as the name of the category unless the label's mask property overrides this. If an empty label is provided to {{catboiler}} (but not its subtemplates), the label is ROOT.
- {{{sc}}} - The script of the items to be categorised. This is usually empty, but many categories such as those used by Mandarin Chinese can split into subcategories based on script.
- {{{c}}} - Unknown. Always empty.
General workings
<small>మార్చు</small>There are two possible ways for labels to be generated, based on the labeltype setting in {{catboiler customize}}. Both methods use one or more subtemplates of the current template, and use {{catboiler helper}} as a helper template (see below).
The first, called subtemplate mode, uses one subtemplate for each label. So, for example, the label noun for the template {{poscatboiler}} would use a subtemplate called {{poscatboiler/noun}}. Each subtemplate defines its own settings for that specific label, and this is useful if there is no systematic way to decide what the contents of each category should be or what its parents are. If a category is created that does not have a corresponding subtemplate, an error is shown with a link to the missing subtemplate. The subtemplate for the ROOT label is named ROOT and must always be present.
The second, called single mode, uses one subtemplate named ALL to handle all labels, including the ROOT label. This is useful if finer control over the labels is needed, and if there is an easy way to automatically determine the contents and parents of each category. No error checking is done, so the subtemplate itself is responsible for handling invalid labels and such. An example of a template that uses this mode is {{derivcatboiler}}, which uses {{derivcatboiler/ALL}} to automatically generate the parents of each category based on the family/superfamily of the current label.
The catboiler template system distinguishes three kinds of category.
- basic - These categories combine the code and the label and are the 'regular' categories. For example వర్గం:నామవాచకము, వర్గం:నామ వాచక శబ్ధము, Category:nl:Linguistics, వర్గం:భారత దేశము.
- umbrella - These categories have only a label, and contain all basic categories of their label, one for each code. For example Category:Nouns by language, వర్గం:Templates by language, Category:Linguistics, Category:Terms derived from Japanese.
- fundamental - This category acts as the 'top level' for the umbrella categories. There is only one fundamental category for each category boilerplate template. For example Category:All parts of speech, Category:All templates, వర్గం:జాబితాలు, వర్గం:విషయాల వారీగా వర్గాలు. Note that the fundamental category itself does not use catboiler; it is only used as a parent category for umbrella categories.
Subtemplates
<small>మార్చు</small>The following are the main subtemplates called directly by catboiler.
- {{catboiler doc}} - Generates documentation for templates that use catboiler.
- {{catboiler crashtest}} - Tests if the category has the correct name, and displays an error if not.
- {{catboiler linkbox}} - Displays an optional box with external links on the right margin.
- {{catboiler description}} - Shows the description text for the category.
- {{catboiler listsubs}} - Shows a list of subcategories, if the label subtemplate of the current label defined them.
- {{catboiler byscript}} - Called by {{catboiler listsubs}} for script-specific subcategories.
- {{catboiler eachsub}} - Called by {{catboiler listsubs}} for each subcategory to be listed.
- {{catboiler toc}} - Shows a table of contents for the category.
- {{catboiler categorize}} - Categorizes the category into one or more parent categories, as defined by the label subtemplate.
These categories are supplemental and are used in various places throughout the catboiler template system.
- {{catboiler helper}} - A helper template that is used to create label subtemplates.
- {{catboiler customize}} - Defines specific settings for each template that uses catboiler. If you create a new template, you should add its settings here.
- {{catboiler format}} - Generates the names of the categories.
- {{catboiler getproperty}} - Gets a property from a label subtemplate of the current template.