FANDOM


[edit] Template-info Template documentation
Ambox content This template is used on 2,600+ pages.
To avoid any disruptions and to save server load, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. As a courtesy to other users, please discuss any changes at the talk page before implementing them.

Usage

The {{Ifexist not redirect}} template can be used to identify a page which exists, is not blank, and is not a redirect; whereas {{#ifexist}} will only check whether the page exists.

Use the format {{Ifexist not redirect|page|return if true|return if false}}. The 2nd and 3rd parameters are used to define the output of the template if the condition is true or false, respectively. If not defined the default output is "yes" if true and empty if false.

Examples

Existing article (Asphalt 9: Legends):

  • {{Ifexist not redirect|Asphalt 9: Legends|true|false}}: true
  • {{#ifexist:Asphalt 9: Legends|true|false}}: true

Redirect (Asphalt 9):

  • {{Ifexist not redirect|Asphalt 9|yes|no}}: no
  • {{#ifexist:Asphalt 9|yes|no}}: yes

Empty article (Template:Ifexist not redirect/testpage):

  • {{Ifexist not redirect|Template:Ifexist not redirect/testpage|yes|no}}: no
  • {{#ifexist:Template:Ifexist not redirect/testpage|yes|no}}: yes

Non-existent article (Asphalt 3.14159):

  • {{Ifexist not redirect|Asphalt 3.14159|1|0}}: 0
  • {{#ifexist:Asphalt 3.14159|1|0}}: 0

Default output:

  • {{Ifexist not redirect|Asphalt 9: Legends}}: yes
  • {{Ifexist not redirect|Asphalt 3.14159}}:

</div>

Community content is available under CC-BY-SA unless otherwise noted.