Template:Ifexist check redirect/doc

From Hârn
Jump to navigation Jump to search

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