• Home
  • Random
  • Log in
  • Settings
  • About English Wikipedia @ Freddythechick
English Wikipedia @ Freddythechick

Template:Ifexist check redirect/if

  • Language
  • Watch
  • View source
< Template:Ifexist check redirect
Template documentation[view] [edit] [history] [purge]
Shortcuts
  • {{ICR}}
  • {{ICR/if}}

Overview

The {{Ifexist check redirect}} and {{Ifexist check redirect/if}} templates can be used to identify the status of an article: whether the article exists or not; if it does, whether it is blank, and/or whether an article is a redirect and what type of redirect it is (to a section of an article, or to the general article). This extends upon the use of {{#ifexist}}, which will only check whether the page exists.

Usage

{{Ifexist check redirect}} returns one of five values to determine the type of an article; these values are listed in first section of the table below.

{{Ifexist check redirect|ARTICLE}}

{{Ifexist check redirect/if}} provides the same function as {{#if}} and {{#ifexist}}, using the return value of the previous template to provide two cases if the article type matches what is required.

{{Ifexist check redirect/if|ARTICLE|ARTICLE TYPE|IF TRUE|IF FALSE}}

Examples

Type of article Example Code Result
{{Ifexist check redirect}}
Existing article Wikipedia:Articles for deletion <syntaxhighlight lang="wikitext">noexist</syntaxhighlight> noexist
Redirect to article MOS:TV <syntaxhighlight lang="wikitext">article_redirect</syntaxhighlight> article_redirect
Redirect to section MOS:SEASON <syntaxhighlight lang="wikitext">section_redirect</syntaxhighlight> section_redirect
Empty article Template:Ifexist check redirect/empty <syntaxhighlight lang="wikitext">blank</syntaxhighlight> blank
Non-existent article Like this one <syntaxhighlight lang="wikitext">noexist</syntaxhighlight> noexist
{{Ifexist check redirect/if}}
True case MOS:TV <syntaxhighlight lang="wikitext">Article redirect</syntaxhighlight> Article redirect
False case MOS:TV <syntaxhighlight lang="wikitext">Not blank article</syntaxhighlight> Not blank article
This template has not been added to any categories. Please help out by adding categories to it so that it can be listed with similar templates.
The above documentation is transcluded from Template:Ifexist check redirect/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Subpages of this template.
Retrieved from "https://enwiki.freddythechick.net/index.php?title=Template:Ifexist_check_redirect/if&oldid=9529829"
Last edited on 1 October 2018, at 10:49

Languages

      This page is not available in other languages.

      English Wikipedia @ Freddythechick
      • This page was last edited on 1 October 2018, at 10:49.
      • Content is available under Creative Commons Attribution-ShareAlike 4.0 unless otherwise noted.
      • About English Wikipedia @ Freddythechick
      • Desktop