Template:Category if exists
This template uses Lua: |
This template outputs a category if the category exists. Otherwise, it returns nothing. It is intended for use in templates.
This template follows category redirects (using
- REDIRECT Template:Template link
This page is a redirect. The following categories are used to track and monitor this redirect:
|
TemplateData
<templatedata> { "params": { "1": { "label": "Category name", "description": "Category for potential inclusion if it exists. \"Category:\" prefix is optional.", "example": "Category:Writers", "type": "wiki-page-name", "required": true }, "2": { "label": "Sort key", "description": "WP:SORTKEY of the category.", "example": "Foo", "type": "line", "suggestedvalues": [ " ", "*" ] } }, "description": "Outputs a link to a category if it exists; otherwise returns nothing.", "format": "inline" } </templatedata>
The above documentation is transcluded from Template:Category if exists/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |