ទំព័រគំរូ:topic cat
- ឯកសារកម្មតទៅនេះស្ថិតនៅទំព័រគំរូ:topic cat/documentation។ [កែប្រែ]
- តំណភ្ជាប់មានប្រយោជន៍ : បញ្ជីទំព័ររង • សម្រង់ • ការបញ្ជូនបន្ត
Usage
កែប្រែTopic cat helper is designed to automatically provide a summary and parent categories for any topical category. It does so by relying on the contents of{{topic cat parents}}
and {{topic cat description}}
, which have default parameters as described in {{topic cat parents/default}}
and {{topic cat description/default}}
.
Examples
កែប្រែFor the top category, containing all language specific subcategories:
{{topic cat||Recreation}}
For a language-specific category:
{{topic cat|en|Recreation}} {{topic cat|de|Recreation}}
Subtemplates
កែប្រែThe {{topic cat description}}
template creates the description text for a topic category page. If a topic-specific description exists as a subpage of Template:topic cat description, it will be used to create the description. This subpage can either be its own page or a redirect to one of the "standard variants". If the description parameter is passed to {{topic cat}}
, it will be used instead of this template. The default description can be found at Template:topic cat description/default. Standard variants can be seen at Special:Prefixindex/Template:topic cat description/default.
The subtemplate that is selected based on the value of {{{current}}}
is passed the following parameters:
langlink
- a pre-linked version of the language namecurrent
- the category name for which the description is being shownlang
- the language code passed as the first parameter to{{topic cat}}
Many custom descriptions will use only the langlink parameter and use fully custom text in place of the current parameter. However, some variants of the default description that vary only in terms of capitalization or words surrounding the topic name will use current (an example of this is Template:topic cat description/Automotive, which redirect to Template:topic cat description/default with topics). The lang parameter is not used by any of the default variants, but it may be used in conjunction with {{topic cat name}}
in cases where a language-specific link to another category is desired as part of the description (see Template:topic cat description/Dance for example).
The {{topic cat parents}}
template deals with adding predefined parents to a topic category. If a topic-specific subpage of Template:topic cat parents exists, it will be called with the language code by this template to provide the default parent categories for the topic.
A list of all topic-specific parent templates can be found in Category:Topic cat parent templates.
{{topic cat name}}
កែប្រែ
The {{topic cat name}}
template constructs the template category name from the language code and the category name.
This template can be passed the following parameters:
lang
- the language codecategory
- the name of the categoryprefix
- if passed, it replaces "Category:
" as the prefix (passprefix=
to get the raw category name without a namespace)