-
- 67 Posts
Hi there,
I was wondering if my problem could be solved in a different way than I’ve done right now.
I have 8 image TV’s assigned to a template.
For different reasons I cannot use the Image widget so I call them with an image tag like this:
<img src="[*image1*]" alt="" />
When I have documents where I only have 2-3 images the rest show as image tags with an empty source.
That shouldn’t be a problem and it’s not in Firefox and Safari but in Explorer empty image tags show up as red crosses..
For now I’ve assigned a "Yes/No" Radio TV called "Is the image active?" to each image and use PHx to only show the image tag if the radio is set to "Yes" and otherwise just show nothing.
That is: [*active:is=`Yes`:then=`<img src="[*image1*]" alt="" />`:else=``*]
But I really want to get rid of that radio button....
So my question is.... Is there a way I can use PHx to show the image tag if there is data in the image TV and show nothing if the image tag is empty?
-
- 4,205 Posts
You can also use the isnot=`` to see if it blank.
-
- 1,103 Posts
[+image:ifnotempty=`<img src="[+image+]">`+]