I’ve been trying to use Phx in order to show/not show pre/after-content of TV output. Like so -
[+phx:if=`slideshow-image-1`:is=``:then=``:else=`<li><img src="./assets[*slideshow-image-1*]" width="958" height="270" /></li>`+]
Also tried
[+slideshow-image-1:isnotempty:then=`<li><img src="./assets[*slideshow-image-1*]" width="958" height="270" /></li>`+]
Nothing’s displayed. I’m sure I have Phx running since I’m using Character Limit on some other pages. What am I missing? Or should I approach this in another way?
I couldn’t find an easy method of including X images in a post so I created a couple of TVs, that’s why it looks like this.
Don’t you miss a slash between assets and [*slideshow-image-1*] ?
/assets/[*slideshow-image-1*]... Not sure but it could be that...
Cheers
No the reference is correct. I’ve tried with simply showing text messages just to confirm it’s not the image source.
Oh! Well, I tried your suggestion and it still doesn’t work... this is driving me nuts!
Here’s what I’m currently using:
[+phx:if=`[*slideshow-image-1*]`:is=``:then=``:else=`<img src="./assets[*home-slideshow-1*]" width="958" height="270" />`+]
Tried outputting text if empty just to be sure. Still nothing. And there IS content in the TV.
Try using ifempty instead of =.
Solved. I installed PHx (which is weird considering I have other PHx functions running through the core installation) then tried [+phx:if=`[*slideshow-image-1*]`:is=``:then=``:else=`<img src="./assets[*slideshow-image-1*]" width="958" height="270" />`+]