Manual:Checking for page existence/PROTECTIONEXPIRY method
Appearance
The {{PROTECTIONEXPIRY}}
parser function can be used to check whether a page exists. It returns infinity
if the page exists and is not protected, the actual expiry time if it is protected, and the empty string if it doesn't exist.
It differs from alternatives such as #ifexist: in that the page containing this template is not recorded as linking to or transcluding the page being checked. This has the advantage of avoiding spurious wikilinks, but means that the containing page may not be updated automatically if the checked page is created or deleted later.