I had code that was working perfectly until I upgraded to 2.6.x - now my conditional statement is not working.
Before, this worked in 2.5.5:
{exp:channel:entries channel="sliders" orderby="slider_order" sort="asc"}
{if slider_event_link}
{related_entries id="slider_event_link"}<a href="http://{path=">{/related_entries}_ {if:elseif slider_page_link}<a href="{slider_page_link}">{/if}_ {slider_image}_ {if slider_event_link OR slider_page_link}</a>{/if}
{/exp:channel:entries}Upon upgrade I now have this, which I understand but is not recognizing my IF statement. This runs but only outputs the Image tags - I’ve checked the relationship field and made sure it’s populated:
{exp:channel:entries channel="sliders" orderby="slider_order" sort="asc"}
{if slider_event_link}
{slider_event_link}<a href="http://{path=">{/slider_event_link}_ {if:elseif slider_page_link}<a href="{slider_page_link}">{/if}_ {slider_image}_ {if slider_event_link OR slider_page_link}</a>{/if}
{/exp:channel:entries}Is there a better way to do what I’m doing? I need the condition - I only want to show the link on the image if there if there is a value in the other field.
Also, I noticed that some code was stripped out and this forum won’t let me copy it into this textarea field - see the screenshot for what I really have in my template.
Thanks.