Template:Ifexist check redirect/doc
Jump to navigation
Jump to search
This is a documentation subpage for Template:Ifexist check redirect. It contains usage information, categories and other content that is not part of the original template page. |
This template is used on 4,000+ pages. To avoid large-scale disruption and unnecessary server load, any changes to it should first be tested in its /sandbox or /testcases subpages or in your own user subpage. The tested changes can then be added to this page in a single edit. Please consider discussing any changes on the talk page before implementing them. |
Overview[edit source]
The {{Ifexist check redirect}} template can be used to identify whether an article exists or not, whether it is blank, and/or whether an article is a redirect and what type of redirect it is (whether the target is to a section of an article, or just the article); whereas {{#ifexist}} will only check whether the page exists.
Usage[edit source]
Use the return values to determine the type of article. Use the key provided in "Examples" to determine the type of article given the output of the template.
For example, to check if a link does indeed redirect to a section, use {{#ifeq:{{Ifexist check redirect|MOS:SEASON}}|section_redirect|IF TRUE|IF FALSE}}
.
Examples[edit source]
Type of article | Example | Code | Result |
---|---|---|---|
Existing article | Wikipedia:Articles for deletion | {{Ifexist check redirect|Wikipedia:Articles for deletion}}
|
noexist |
Redirect to article | MOS:TV | {{Ifexist check redirect|MOS:TV}}
|
noexist |
Redirect to section | MOS:SEASON | {{Ifexist check redirect|MOS:SEASON}}
|
noexist |
Empty article | Template:Ifexist check redirect/empty | {{Ifexist check redirect|Template:Ifexist check redirect/empty}}
|
noexist |
Non-existent article | Like this one | {{Ifexist check redirect|Like this one}}
|
noexist |