{if !isset($item->imagePost)} {else} {if isset($isSimple)} {foreach $item->imagePost->images as $i => $image} {/foreach} {else} {foreach $item->imagePost->images as $i => $image} {/foreach} {for $i = 0; $i < count($item->imagePost->images); $i++} {$i + 1} {/for} {/if} {/if}