This high-risk template is indefinitely protected from editing to prevent vandalism.

Template:If page exists

From Uncyclopedia, the content-free encyclopedia
(Redirected from Template:Linkless exists)
Jump to navigation Jump to search

true

[edit] [purge] Template-info.svg Template documentation

Description

Sometimes editors wish to write code that handles things differently depending on whether a given page exists or doesn't exist. A parser function {{#ifexist:…}} is ordinarily used for that purpose. A side effect is that the checked page is added to Special:WantedPages:

  • This is desirable for templates like {{RL}}, as it helps build reports of pages that would be and should be linked, if someone would write those pages
  • For many other scenarios, it's an unwanted side effect, and this template should be used instead of {{#ifexist:…}}

In other words, this template is like {{#ifexist:…}} without the backlink, hence its Wikipedia name Template:Linkless exists, which redirects here.

Usage

{{If page exists|page|if exists|if does not exist}}

See also

Further reading

History

This was lifted from Wikipedia with {{Navbar}} in mind: as a subroutine of {{Navbox}}, it's used frequently on navigation templates that need no discussion; and replacing the code was intended to remove useless links cluttering Special:WantedPages.

Spork.jpg This template was originally sporked from wikipedia:Template:Linkless exists.