diff --git a/etemplate/inc/class.tab_widget.inc.php b/etemplate/inc/class.tab_widget.inc.php index ee32a9320e..e63712bb3a 100644 --- a/etemplate/inc/class.tab_widget.inc.php +++ b/etemplate/inc/class.tab_widget.inc.php @@ -89,10 +89,13 @@ $tab_widget = new etemplate('etemplate.tab_widget'); $tab_widget->set_cell_attribute('@tabs','obj',$tabs); - if ($tmpl->tpls_in_file > 1) - $tab_widget->set_cell_attribute('@body','obj',new etemplate($selected_tab,$tmpl->as_array())); - else - $tab_widget->set_cell_attribute('@body','name',$selected_tab); + + $stab = new etemplate($selected_tab,$tmpl->as_array()); + $options = array_pad(explode(',',$stab->size),3,''); + $options[3] = ($options[3]!= '' ? $options[3].' ':'') . 'tab_body'; + $stab->size = implode(',',$options); + $tab_widget->set_cell_attribute('@body','obj',$stab); + $tab_widget->set_cell_attribute('@body','name',$selected_tab); $cell['type'] = 'template'; $cell['obj'] = &$tab_widget; @@ -117,4 +120,4 @@ } return True; } - } \ No newline at end of file + }