- テンプレートを使用したカテゴリ
- Categorization using templates
Many templates include category declarations in their transcludable text, for the purpose of placing the pages containing those templates into specific categories.
It is not normally recommended that articles be placed in ordinary content categories in this way. The technique is likely to lead to pages being miscategorized, or their categories being listed in an undesired order. Further, if such a template is used on the category page for the transcluded category, a confusing loop is generated, with the category listed as a subcategory of itself. However the technique is very commonly used for populating certain kinds of project categories, including stub categories.
Notice that changing the category in a template does not cause all pages with the template to be recategorized immediately – pages may need to be edited before their categorization changes. This means that category lists for categories populated in this way may not always be up to date.
Category declarations in templates often use {{PAGENAME}} as the sort key, particularly if they are designed to be placed on talk pages, as this suppresses the prefix Talk: from the sort keys.