![]() |
|
Welcome to the Vanguard Spheres forums. You are currently viewing our boards as a guest which gives you limited access to view our discussions, articles/interviews and photo galleries. By joining our community you will gain access to post your own topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features and tools like our upcoming Guild Management Tool (GMT). Registration is fast, simple and absolutely free so please, join our community today! As a bonus this banner will disappear once you are registered! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
|
|
ViewsTemplate:ExistsFrom Vanguard WikiSpheresA conditional template, which determines whether a page exists: {{exists|<pagename>}} (do not use a named parameter — pagename= will not work) If a page named "pagename" exists, the template will return the string "true". Otherwise, it will return the string "false". You can also choose your own return values: if the page exists, it will return the value of the {{exists|<pagename>|<then=>|<else=>}} How it works: The template exploits the fact that trying to link to a non-existent page and trying to include a non-existent page as a template have the exact same effect; they produce a link to edit that page:
Therefore, the {{equal}} template is used to determine whether the string produced by linking to the page is identical to the one produced by trying to include it as a template. If they do not match, the page exists. If they do, it doesn't. Credit/License |