Template:MetaCat
Use this tag for meta categories only, that should only contain other categories that are grouped by a specified criterion.
The template automatically sets the following categories:
- Meta categories; depending on the parameters, it may autocategorize into one or more categories. Currently, only specific input makes it autocategorize as this is a work in progress but soon to be generalized.
- Categories by ... (flat list) (in one of those)
Usage
{{MetaCat |1= }}
Important: The parameters are case-sensitive because they are used to form category names. Always use lower case unless it's a proper noun.
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | criterion it's sorted by (#1) | The first parameter is what the member categories sort by, e.g. Books by genre would be genre . Buildings in Canada by year of completion would be {{MetaCat|year of completion}} , not simply {{MetaCat|year}} . The template may autocategorize multiple "by xxx" into the same flat category, like "by year of completion" categories are currently treated the same as the "by year" ones, however, including the full criteria will enable us to easily separate them in the future if desired. The only exception is when there are two criteria, separated by "and" or "or". For example, on Buildings in Moscow by period and style, you would use {{MetaCat|period|style}} . This places it in both Categories by period (flat list) and Categories by style (flat list). In addition, this allows for later combining them (by modifying the template) to create a new flat category if we want. | empty | required |
2 | criterion it's sorted by (#2) | see above | empty | optional |
topic | unused parameter | empty | optional | |
topic2 | unused parameter | empty | optional | |
topic3 | unused parameter | empty | optional | |
flat | flat list | Add "yes" if it's a "flat list" (contains also the pages in subcategories). Add "no" to avoid mentioning parent categories. | empty | optional |
topic-cat | category | Will add page to given category with sorting key " {{{1}}}". For example {{MetaCat|industry|topic-cat=Companies of Algeria}} could be used in Category:Companies of Algeria by industry | empty | optional |
type | type | type of items (e.g. Modules, Templates, ...) | empty | optional |
Template data | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information Use this tag for meta categories only, that should *only* contain other categories that are grouped by a specified criterion.
|
Additional information
The template is intended to be used in the following namespaces: the Category namespace
The template is intended to be used by the following user groups: all users
Placement: At the top of the page
See also
- Commons:List of meta category criteria – a list of the "by xxx" currently in use.
- Commons:Categories requiring diffusion – tabular listing
More general templates with similar purpose:
- {{Categorise}} – Use this just for tagging main categories requiring permanent control; that is use on (non-meta) main categories that also shouldn't contain files directly (or very little).
(Tagged categories are automatically inserted into Category:Categories requiring permanent diffusion.) - {{CatDiffuse}} – temporary tag when a category needs files sorted into subcategories because it's overcrowded.
- {{CatCat}} – Used when a main category should contain no files but only other categories, but is not part of a Meta-categorization schema of 'XXX by YYY' form.
- {{ValiCat}} – Used when a main category should contain no files but only subcategories like "Valid SVG created with" or "Invalid SVG created with"
- {{FlatCat}}
- {{Template category}}
- in general…
- For categories to get sorted once use {{CatDiffuse}}, for metacategories ("by country", "by name" etc.) use {{MetaCat}} or its more specialized variants.
Localization
العربية ∙ беларуская (тарашкевіца) ∙ বাংলা ∙ català ∙ čeština ∙ dansk ∙ Deutsch ∙ English ∙ Esperanto ∙ español ∙ فارسی ∙ suomi ∙ français ∙ galego ∙ hrvatski ∙ magyar ∙ Bahasa Indonesia ∙ italiano ∙ 日本語 ∙ 한국어 ∙ Lëtzebuergesch ∙ македонски ∙ മലയാളം ∙ Nederlands ∙ norsk nynorsk ∙ polski ∙ português ∙ português do Brasil ∙ română ∙ русский ∙ sicilianu ∙ slovenčina ∙ slovenščina ∙ svenska ∙ Türkçe ∙ українська ∙ 中文 ∙ 中文(简体) ∙ 中文(繁體)
This template makes use of {{Autotranslate}} and the translate extension. The layout of the template can be found under Template:MetaCat/layout.