Template:Category ifexist/doc
This is a documentation subpage for Template:Category ifexist. It may contain usage information, categories and other content that is not part of the original template page. |
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[edit]
{{Category ifexist|categoryname|optionalsortkey}}
Examples[edit]
{{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.