I am trying to set up a slider in ExpressionEngine which will display a video if the video embed code exists, otherwise it will display an image slider. Currently, I am not able to hide the image slider if the video code exists(but the video does get placed on the page).
Here is my code:
{slider}
{if video}
{video}
{if:else}
{if total_rows > "1" && row_count == "1"}
<div id='news_slider'>
{/if}
<img title="{img_title}" src="{img}" />
{if total_rows > "1" && row_count == total_rows}
</div>
{/if}
{/if}
{/slider}
Any ideas? Thanks!