Template:MetaCat
This documentation is transcluded from Template:MetaCat/doc.
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.
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 |
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 ''[[Commons:Meta category|meta categories]] only'', that should ''only'' contain other categories that are grouped by a specified criterion. <div class="shortcutbox-template plainlinks noprint plainlist" style="float:right; margin:.3em .3em .3em 1em; border:1px solid #ccc; background-color:#fff; padding:0 0.5em; text-align:center; font-size:x-small; line-height:150%"><div lang="en" xml:lang="en" class="description en" style="display:inline;">[//commons.wikimedia.org/w/index.php?title=Special:WhatLinksHere/Template:MetaCat&hidelinks=1&hidetrans=1&namespace=10 <span style="text-decoration:underline;color:black;">Redirect:</span>]</div> <ul> <li>{{[//commons.wikimedia.org/w/index.php?title=Template:Metacat&redirect=no <span style="color: green">Metacat</span>]}}</li> </ul></div>
|
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 category should only contain other categories, but is not part of a Meta-categorization schema of 'XXX by YYY' form.
- {{ValiCat}} – Used when a category should only contain subcategories like "Valid SVG created with" or "Invalid SVG created with"
- 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
This template is localized through {{Autotranslate}}. The layout of the template can be found under Template:MetaCat/layout.
To add your language to the list of languages supported by this template, please copy the code of Template:MetaCat/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.