Template:Category link if exists/doc

From English Wikipedia @ Freddythechick

This is the current revision of this page, as edited by imported>HouseBlaster at 15:04, 8 August 2024 (Update after merge). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a simple helper template, to be used in other templates. It displays a link to a category if that category exists; otherwise it just displays greyed-out plaintext.

Optional display text may be added as a second parameter.

Usage

{{LinkCatIfExists|CategoryName|OptionalDisplayText}}

Simple usage
{{LinkCatIfExists|CategoryName}}
Examples:
With optional display text
{{LinkCatIfExists|CategoryName|DisplayText}}
Examples:

See also