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

From Vanguard WikiSpheres

A conditional template, which uses named parameters to select from two or more alternatives:

{{qif|<test=>|<then=>|<else=>}}

When used in this manner, "qif" functions just like {{if}}: when the test parameter is an empty string, the value of else is displayed. Otherwise, the value of then is displayed. Unlike {{if}}, however, you must use named parameters (test=, then=, else=).

However, you can also use it as you would a "switch" or "select" statement. For example:

{{qif|<test=>|<testeven=>|<testodd=>}}

Here, if the result of test is the string "even", then the contents of testeven are displayed. If the result is "odd", the contents of testodd are displayed. Any other value produces no output at all. This can be used to select from any number of possible results.

How it works: The template first tries to display a parameter with the name is "else" followed by the contents of the test parameter. If no such parameter exists, it tries again with "test" followed by the contents of the test parameter. Finally, if neither exists, the value of then is displayed.

Credit/License
This template taken from WowWiki and is covered under the GNU Free Documentation License 1.2


All times are GMT -4. The time now is 02:13 AM.



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.