{section name=x loop=$categories}
{if $categories[x].index_view eq 1}
{else}
{/if}
{/foreach}
{if $smarty.section.x.first}
{$categories[x].category}
{foreach name=x from=$categories[x].id|news_in_category:$theme_home_category_news_number key=id item=news} {if $smarty.foreach.x.first}
{$news.thumbnail|article_thumbnail:$news.source_id:"max-width":$theme_allow_lazyload}
{$news.title|html_decode}
{$news.details|html_decode|strip_tags|truncate:150}
{$content_ad}
{/if}
{/if}
{/section}
{include file="sidebar.html"}