Template:Ifexist/doc

This template checks for existence of pages.

The #ifexist parser function exists as part of the ParserFunctions extension, but will put up the checked page title on the list of wanted pages if it doesn't exist (see task 14019). This template serves as a workaround for this flaw. Use this template sparingly because it also uses an expensive parser function.

How to use

Parameters

Parameter Allowed values Notes
1 Page title The page title to be checked. This parameter is case-sensitive, except for the first letter.
2 String Optional. The text to render if the page specified in the parameter 1 exists. Defaults to true.
3 String Optional. The text to render if the page specified in the parameter 1 doesn't exist. Defaults to an empty string.

Example

* The page {{ifexist|Ash's Pikachu|"[[Ash's Pikachu]]" exists|"Ash's Pikachu" doesn't exist}}.
* The page {{ifexist|Ash's Mudkip|"[[Ash's Mudkip]]" exists|"Ash's Mudkip" doesn't exist}}.
  • The page "Ash's Mudkip" doesn't exist.

See also