FANDOM


This is a documentation subpage for Template:Ifexist not redirect.
It contains usage information, categories and other content that is not part of the original template page.


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}}:


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