Template:Category pair/doc

Usage
Typical usage should be on dissimilar preceding/succeeding categories, or where a large gap exists in otherwise sequential categories. For similarly named sequential categories with gaps less than 5 years, use instead, and  for gaps up to 15 years from the parent.


 * For 2 adjacent categories, a preceding, and a succeeding  , place:
 * at the top of the category page. Each category is displayed only if it exists. If neither category exists, nothing will be displayed.
 * at the top of the category page. Each category is displayed only if it exists. If neither category exists, nothing will be displayed.


 * If there is no succeeding category, you may simply place:
 * at the top of the category page.
 * at the top of the category page.


 * If there is no preceding category, then leave the first parameter empty, and simply place:
 * at the top of the category page.
 * at the top of the category page.

Examples

 * Preceding and succeeding categories, both exist


 * Preceding category only, which exists


 * Succeeding category only, which exists


 * Preceding and succeeding categories, only preceding exists


 * Preceding and succeeding categories, only succeeding exists


 * Two non-existent categories, so no output:

Error checking
Only the first two parameters are processed, others are ignored.

If more than two parameters are supplied, a warning message is shown when the page is previewed. When it is saved, the page is added to the hidden tracking category: Category:Pages using category pair with more than 2 parameters.

If more than two parameters are supplied, the template is unlikely to do what the editor intended. For,  , and  , for example:
 * will ignore, and
 * will ignore, because a duplicate   character between the two categories causes   to be the third parameter rather the second.

Tracking categories

 * If neither parameter is a category which currently exists the template will produce no output. This is not necessarily an error; the other categories may simply be part of an incomplete series which will be completed in due course
 * If neither parameter is a category which currently exists the template will produce no output. This is not necessarily an error; the other categories may simply be part of an incomplete series which will be completed in due course


 * See above: Error checking
 * See above: Error checking