Jump to content

Template:If in category/doc

From Wikipedia, the free encyclopedia

Checks whether a page is in a category, and returns different output based on the answer.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Category1

Category being checked to see if the page is in it; "Category:" prefix is optional

Example
Category:X1
Page namerequired
If yes2

Output if the page is in the category. If neither "If yes" nor "If no" are set, defaults to "yes".

Contentsuggested
If no3

Output if the page is not in the category

Contentsuggested
Pagepage

Page being checked. Defaults to the current page.

Default
FULLPAGENAME
Page nameoptional

Example

[edit]

{{If in category|page=Amastra subsoror|Extinct gastropods|Dead as the dodo|Perhaps it's still alive}} produces Dead as the dodo.