The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
using a variable and conditional in template
i wrote a simple query that returns a numeric value or 1, 2, or 3 etc.
what i want to do is use this variable to make a conditional. $string6 is my variable and it does return proper # can i use this variable in a conditional within a template to do something like this ?? example: Code:
<if $string6="1">Hello</if> <if $string6="2">Goodbye</if> i have a shoutcast radio station up, and based on which dj is online i want to show diff info. |
#2
|
|||
|
|||
oops i think this is is in wrong forum.
sorry for that. |
#3
|
||||
|
||||
Quote:
Try this: <if condition="$string6==1">Hello <else /> <if condition="$string6==2">Goodbye </if> </if> |
#4
|
|||
|
|||
thanks much,
i had actually went with the if condition statement, and the double ==, but i put the quotes in wrong spot <if condition=$string6=="1"> or <if condition $string6=="1"> i had been up and down all the combinations i could think of, but the one that works. always something simple that gets me..... LOL !! problem solved. oh yeah, and i am gonna rename it, when i get some more of it sorted out, i had a couple of probs with variables clashing. thanks again. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|