Template:Category if exists/doc

From Bharatpedia, an open encyclopedia
< Template:Category if exists
Revision as of 17:14, 11 October 2024 by Muskit Gergous (talk | contribs) (Created page with "{{Documentation subpage}} {{high risk}} {{Expensive}} {{tsh|Category ifexist}} {{Lua|Module:If not given or empty}} 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 {{t|resolve category redirect}}). ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "Category name", "description": "Category for potential...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 {{resolve category redirect}}).

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Category if exists

Outputs a link to a category if it exists; otherwise returns nothing.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Category name1

Category for potential inclusion if it exists. "Category:" prefix is optional.

Example
Category:Writers
Page namerequired
Sort key2

[[WP:SORTKEY]] of the category.

Suggested values
*
Example
Foo
Lineoptional

See also