{section name=x loop=$categories} {if $categories[x].id|news_in_category:$theme_sections_items_number neq 0}

{$categories[x].id|category_title}

{foreach name=x from=$categories[x].id|news_in_category:$theme_sections_items_number key=id item=h} {if $smarty.foreach.x.first}
{$h.thumbnail|responsive_image:$h.feed_id} {$h.title|html_decode}

{$h.details|html_decode|strip_tags|truncate:200}

{else}
{$h.thumbnail|responsive_image:$h.feed_id}
{$h.title|html_decode}
{/if} {/foreach}
{/if} {/section}