Vanguard Spheres  

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.

Home Forums WikiSphere Gallery Chat Arcade Today's Posts
Go Back   Vanguard Spheres > Vanguard WikiSpheres
Register FAQ Members List Who's Online Search Today's Posts Mark Forums Read

Personal tools

Template:Exists

From Vanguard WikiSpheres

A 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 then parameter, if present, instead of "true". If the page does not exist, it will return the value of the else parameter, if present, instead of "false".

{{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:

Link:DELETE THIS PAGE IF IT EXISTS
Template:DELETE THIS PAGE IF IT EXISTS

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
This template has been taken from WowWiki, and is covered under the GNU Free Documentation License 1.2


All times are GMT -4. The time now is 05:10 PM.



Regency Sword © T. King @ Tkingart.com
Trademarks are the property of Sigil Games Online, Inc.
Game content and materials copyright Sigil Games Online, Inc. All rights reserved.