Template:Parent cat/doc

From MOASSpedia
Jump to navigation Jump to search

This template formats an information box at the head of a geographical parent category, a category where all or most of the articles are held in sub-categories. It holds information such as notes on the content, Wikimedia Commons category, main article and "see also" links, and may link to a map from OpenStreetMap showing the coordinates of child pages. For a diffused parent category, it may provide a link to a canned PetScan query that gives a consolidated list of pages in the child categories. For a non-diffused category, it may provide links to PetScan queries on articles in child categories but not in the parent and articles in the parent but not in any child category. The PetScan links and the map should be useful in maintenance.

This template may replace {{All included}} for non-diffused geographical categories, and may also replace {{Cat main}}, {{See also}}, {{Catseealso}} and {{GeoGroup}}, presenting the same information in a less cluttered and more consistent format.

Usage

{{Parent cat
|child_level =
|metacategory =
|sample_child =
|exception =
|type =
|child_scan =
|child_no_parent =
|parent_no_child =
|geogroup =
|title=
|notes =
|main =
|commonscat =
|seealso =
|catseealso =
|footer =
|TOC =
}}

Parameter names and descriptions

Parameter name Description
Parent information: rendered only if |metacategory= or |sample_child= are specified
child_level Administrative level of child categories, e.g. county, canton, department. Optional.
metacategory Category that holds all the child categories. e.g. Category:Rivers of England by county. Optional. Use |metacategory2= for a second metacategory
sample_child Name of a sample child category (without "category:" prefix). Ignored if metacategory is provided.
exception Qualifier to the statement "should hold all entries in the child categories", e.g. exception=apart from seasonal creeks. Optional.
type empty if the parent category is diffused, so not expected to be populated. Optional: defaults to populated.
child_scan PetScan identifier (e.g. 21263054) of a scan that lists all pages in child categories. Used for diffused categories. Optional.
child_no_parent PetScan identifier of a scan that lists pages in child categories that are not in the parent. Used for non-diffused categories. Optional.
parent_no_child PetScan identifier of a scan that lists pages in the parent category that are not in any child category. Used for non-diffused categories. Optional
General information
geogroup If non-blank, includes a {{GeoGroup}} box that lists all coordinates in child pages. Optional.
title Not expected if |metacategory= or |sample_child= is specified. Otherwise default Portal:Geography. Optional
notes (or |other=) Information about the category such as types of page included. Optional.
main Name of the main article for this category. Optional.
commonscat Name of the corresponding Wikimedia Commons category. For a second category, use |commoncat2=. Optional.
seealso Name of a related article. For more than one article, use |seealso2= ... |seealso4=. Optional.
catseealso Name of a related category. For more than one category, use |catseealso2= ... |catseealso6=. Optional.
footer Text to be placed below the infobox. May be a template such as {{Census-designated places in the United States}}. Optional.
TOC Enter |TOC=y to place an alphabet table of contents below the infobox if the category holds more than 200 entries. Optional.

PetScan queries

PetScan is a useful maintenance tool held at petscan.wmflabs.org. Sample queries:

Purpose Depth Categories Combination Negative categories Example
All articles in child categories 1 Metacategory holding all child categories [1]
Articles in child but not parent 1 Metacategory holding all child categories Union Parent category|0 [2]
Articles in parent but not in child 1 Parent category|0 Union Metacategory holding all child categories [3]

The vertical bar and 0 after the parent category name overrides Depth=1 and tells PetScan to only list articles in the parent category, and not articles in categories below the parent.

If there is no metacategory holding all child categories, you may have to list the child categories in the query – or create a metacategory and add the child categories to it.

Before and after example

Before: multiple lines of text and templates

Map all coordinates using: OpenStreetMap 
Download coordinates as: KML

This category is for named unincorporated communities in the U.S. state of Alabama that lack political existence, whether census-designated places or neighborhoods.

After: integrated template with PetScan links

See also

Other category-header templates