మూస:విషయాల వారీగా వర్గాలు


The following documentation is located at Template:విషయాల వారీగా వర్గాలు/doc. [edit]
Note: Please move the documentation subpage to Template:విషయాల వారీగా వర్గాలు/documentation.

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}}.

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}}

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 name
  • current - the category name for which the description is being shown
  • lang - 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.

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 code
  • category - the name of the category
  • prefix - if passed, it replaces "Category:" as the prefix (pass prefix= to get the raw category name without a namespace)