Jump to content

How to add new tab in BO


Recommended Posts

Programmaticaly :

$tab = new Tab();
foreach (Language::getLanguages() as $language) {
   $tab->name[$language['id_lang']] = 'My Tab';
}
$tab->class_name = 'myTab'; // example, if you make a class myTab.php displaying your new tab content
$tab->module = 'your module name';
$tab->id_parent = 0; // to make a new tab, else id of father's tab
if(!$tab->save()) {
   return false;
}



Or simply go to Tools -> Tabs, and make your new tab manually.

Link to comment
Share on other sites

Thanks,

Programmaticaly :

$tab = new Tab();
foreach (Language::getLanguages() as $language) {
   $tab->name[$language['id_lang']] = 'My Tab';
}
$tab->class_name = 'myTab'; // example, if you make a class myTab.php displaying your new tab content
$tab->module = 'your module name';
$tab->id_parent = 0; // to make a new tab, else id of father's tab
if(!$tab->save()) {
   return false;
}



Where do I have to save it? and named what ...php?




Or simply go to Tools -> Tabs, and make your new tab manually.

Done, but when I add new tab, then click the tab that already added, contain said "Tab does not exist". Where do I have to input the contain?



Thanks again,
Link to comment
Share on other sites

×
×
  • Create New...