<section role="banner">
[[!getImageList? &tvname=`imageSelector`&tpl=`@CODE:
<a class="preview" [[+video:notempty=`href="[[+video]]" rel="shadowbox;width=720;height=480;"`:else=`href="[[+image]]" rel="shadowbox[Img]"`]] title="[[+title]]"><img src="[[+image]]" alt="[[+alt]]"></a>`]]
</section><!-- images -->
These are the input fields:
+image (selector)
+alt
+title
+video
Here is what I hope to accomplish. I'm using shadowbox to display images input using MIGX. By default, images are automatically given a shadowbox call. I got the image portion working as it should.
HOWEVER...Now, I want to get a little fancy:
If I input a video URL to the +video field, I would like the href="" to be populated with that link. If I don't fill out the +video part, I want it to fall back to the image. What I have above simply isn't working. (Or, problem lies between chair and computer?)
This is typically what I'm trying to achieve:
if +video = hascontent then <a href="[[+video]]" rel="shadowbox;width=720;height=480;" title="[[+title]]>
else = <a href="[[+image]]" rel="shadowbox[Img]" title="[[+title]]>