Puzzle Potato Dry Brush.png
UnNews Logo Potato1.png

Welcome to the Mother Ship of amateur comedy writing! (Amateur means we don't pay you to do it.)

This is where the original Uncyclopedia wound up. You might as well pick a user name. We have no "partners" that want to sell you stuff. Giving your email simply lets you recover your password; we don't send spam. Uncyclopedians get a talk page, private edit area, and a welcome, maybe, if you actually edit; and we won't de-platform you for your views, if they're funny.


Template:If page exists/doc

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
This is a documentation subpage for Template:If page exists.
It contains usage information, categories and other content that is not part of the original template page.
To view the template page itself, see Template:If page exists.

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.