{assign var='alt1' value=true}
{assign var='cnt' value=0}
{* Count of items in row *}
{assign var='count' value=5}
{foreach from=$photos item='photo' name='p'}
{if $cnt == $count}
{if $alt1}{assign var='alt1' value=false}{else}{assign var='alt1' value=true}{/if}
{assign var='cnt' value=0}
{/if}
{assign var='cnt' value=$cnt+1}
{capture name='href'}
{url_for_route for="view_photo:[id=>`$photo.dto->id`]"}
{/capture}
{capture name='infoStr'}
{if $photo.comments_count}{$photo.comments_count} {text key='photo+comments_count'}{/if}
{/capture}
{if $cnt == 1}
{/if}
{decorator name='photo_list_item'
data=$photo
href=$smarty.capture.href
url=$photo.url
width=$widthConfig
height=$heightConfig
infoString=$smarty.capture.infoStr
set_class="ow_item_set`$count`"}
{if $cnt == $count && $smarty.foreach.p.iteration != 1 || $smarty.foreach.p.last}
{/if}
{foreachelse}
{text key='photo+no_photo_found'}
{/foreach}