View Full Version : did i do this correctly?
AN-net
08-17-2004, 01:19 AM
i am trying to make a condition with an else existing in templates
here is my code:
<tr>
<td class="vbmenu_option"><a href="journal.php?do=away">Turn Away <if condition="$journalinfo[away]==1">Off</else>On</if></a></td>
</tr>
it doesnt show neither Off nor ON:(
13th_Disciple
08-17-2004, 03:25 AM
I believe you would have to do two if conditionals.. I haven't seen an else in a template, that I am aware of.. but I am by no means up to snuff on any of this..
btw, looking forward to the journal, AN-net.. :)
Colin F
08-17-2004, 04:01 AM
You can use else. To make it xhtml compliant, use < /else>
What is the value of $journalinfo[away]?
[edit]why did I bother, it's much too early in the morning :)
Thanks Zachery
Zachery
08-17-2004, 04:03 AM
<tr>
<td class="vbmenu_option"><a href="journal.php?do=away">Turn Away <if condition="$journalinfo[away]==1">Off<else />On</if></a></td>
else is a single tag, so its <bleh /> not </bleh> << ending tag
<if condition="$var"> $var is true <else /> $var is false </if>
AN-net
08-17-2004, 04:56 AM
woopsies ^.^ thanks zac:D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.