Help:Page existence

Wikitext methods to determine whether a page exists: Examples: gives:
 * 1
 * existence b
 * existence c
 * Special:Allpages/existence
 * Special:PrefixIndex/exist

Another method is, of course, going to the web address concerned and seeing the content or a message that the page does not exist.

Branching applications
A typical application of existence detection is: with the important special case:
 * producing the content of a page if it exists, otherwise some default
 * producing the content of a page if it exists, otherwise nothing

If the set of possible pages is limited then an alternative is creating them all, with the extra pages containing the default value(s), and unconditionally transcluding the pages.

CSS class
If existence is checked in order to hide red links, an alternative for  and   is , giving " foo ", where we have the CSS specification

.hidden-redlink a.new { display: none; }

(which on Meta has been added to Mediawiki:Common.css).

Conversely an emphasized style could be used for red links, or only red links could be displayed.