{section name=x loop=$categories}
{if $categories[x].index_view eq 1}
{if $categories[x].id|videos_in_category:5 neq 0}
{if $smarty.section.x.first}
{$categories[x].category}view all
{foreach name=x from=$categories[x].id|videos_in_category:$theme_home_category_videos_number key=id item=videos} {if $smarty.foreach.x.first}
{$videos.title|html_decode|truncate:50}
{$videos.details|html_decode|strip_tags|truncate:100}
{else}
{$videos.thumbnail|video_thumbnail:'product-image':1}
{$videos.title|html_decode|truncate:40}
{/if}
{/foreach}
{$content_ad}
{/if}
{/if}
{/if}
{/section}
{include file="sidebar.html"}