Template:Category ifexist
Appearance
This template is used on approximately 5,100 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
Places a page in a category if that category exists. Otherwise does nothing.
Usage
{{Category ifexist|categoryname|optionalsortkey}}
Examples
{{Category ifexist|Ruritanian astronauts}}
- If Category:Ruritanian astronauts exists, the page is added to that category. Otherwise the template does nothing.
{{Category ifexist|Lilliputian centenarian sportsmen|List}}
- If Category:Lilliputian centenarian sportsmen exists, the page is added to that category with the sort key
List
. Otherwise the template does nothing.