<div class="portlets portlets_midblock">
    {assign var="tabinfo" value=$portlet_tabs_config.$tab_id}
    {section name=cols start=0 loop=$tabinfo.columns step=1}
        {assign var="col" value=$smarty.section.cols.index}
        <div class="portlet_col" style="width:{intval(100/$tabinfo.columns)}%;">
            {if isset($portlets_config.$tab_id.cols.$col)}
                {foreach item="portlet" from=$portlets_config.$tab_id.cols.$col}
                    <div class="portlet" id="{$portlet.portlet_id}___{$portlet.unique_id}">
                        {include file='r_basic/widget.tpl' widget_id=$portlet.portlet_id open=$portlet.open unique_id=$portlet.unique_id 
                            widget_data=$portlet.widget_data widget_title=$portlet.title widget_auto_refresh=$portlet.auto_refresh}
                    </div>
                {/foreach}
            {/if}
        </div>
    {/section}
</div>   