![]() |
HTML <if>?
How do you use this? I can't find any guides, or indeed anything about the <if> tag anywhere outside the actual code of forum software itself! I'm trying to work an if clause into a template modification (iTrader based), and I just need to know the correct usage of <if>... Does it have to be
HTML Code:
<if condition=>(code)</if> HTML Code:
<if $var=$var2>(code)</if> And what about else options? |
I'm not sure if html has if's but javascript does. this may help, you can integrate it with html.
|
The syntax is:
Code:
<if condition="CONDITION">Displayed when CONDITION is TRUE</if> |
That's what I thought. But all the time I see
Code:
<if condition=$var>(stuff to do)</if> |
In PHP, $var is the same as isset($var) which returns TRUE if $var exists and FALSE if it does not.
So-- Code:
<if condition="$var">Stuff to do</if> |
Oh, I see. Thanks. I'm going to try out my template modification and see if it works...
|
see this tutorial for vB conditionals: http://www.vbulletin.com/docs/html/
type in 'template conditionals' in the search box and click on first link. |
The condition between the two quotes is parsed as a boolean expression.
Quote:
Code:
<if condition="$variable == 'Yes'"> |
Thanks for the help guys. Modification works great. :)
|
All times are GMT. The time now is 05:10 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|