I’ve read the phx wiki but can’t get my head around it, I’m trying on my main template to say
If this tv ([*role*] is empty then don’t show anything, else show this tv
[+phx:if=`[*role*]`:is=``:then=`nothing`:else=`[*role*]`+]
Can anyone shed some light on this for a code muppet like myself
cheers
ss
Hi,
the code looks good to me
A shorter syntax would be:
[*role:isnot=``:then=`[*role*]`:else=`nothing`*]
But first you have to check that no widget is applied to the tv.
:-)
Thanks for the help, I used this, seems to work, in fact I’m re-thinking my templates, using conditions I should be able to cut down on the number of templates to use
[*role:is=``:then=` `:else=`
<h5>[*role*]</h5>`*]
-
☆ A M B ☆
- 476 Posts
Thanks for the help, I used this, seems to work, in fact I’m re-thinking my templates, using conditions I should be able to cut down on the number of templates to use
Yeh, using PHx helps me reduce the number of templates I have to set up by just making conditions...I don’t know a lick of PHP and PHx seems to be a great primer for PHP in understanding simple conditional statements. I use PHx pretty extensively.
Precision Web Development ... SmashStack.com