AdvancedContent 0.9.4.3
CGExtensions 1.38.1
CGSimpleSmarty 1.7.1
CGSmartImage 1.15
ListIt2 1.4.1
ListIt2Projects 1.4.1
I am currently using ListIt2 For a nice little plug in (ListIt2Projects 1.4.1), I have an image I want to rotate on the ListIt2 projects pages that are created, this works really well, but I would like to only have as many images as selected in the file dropdown in the ListIt2 admin area in the backend showing on the frontend when you are setting the "project" item up, there are three available options for images, but if only two are selected (I don't want to make three images mandatory) I only want to have two images rotating.
So I am using the {if} value to ignore the unselected image option.
Code: Select all
<ul class="slides">
<li><img src="{root_url}/uploads/images/Projects/{$item->fielddefs.main_image.value}" alt="{$item->fielddefs.main_image.value}" /></li>
{html_image file="{root_url}/uploads/images/Projects/{$item->fielddefs.secondary_image_1.value}" alt="{$item->fielddefs.secondary_image_1.value}" assign="secondary_image_1"}
{if !empty($secondary_image_1)}
<li>{$secondary_image_1}</li>
{/if}
{html_image file="{root_url}/uploads/images/Projects/{$item->fielddefs.secondary_image_2.value}" alt="{$item->fielddefs.secondary_image_2.value}" assign="secondary_image_2"}
{if !empty($secondary_image_2)}
<li>{$secondary_image_2}</li>
{/if}
</ul>The first <li> image item works wonderfully, but the subsequent two with the {if} values don't. Any help very appreciated indeed.


