Jump to content

[SOLVED] New tab in back office by module


muirch
 Share

Recommended Posts

I am creating a module, which need some user-content administration.
Is it possible to make a new tab with administration functional in back office under "Clients"?
How I can make a module, which do that?

Share this post


Link to post
Share on other sites

Copy one of the files in the admin/tabs directory and create your tab based on that. Once you've done that, go to Tools > Tabs, create a new tab, enter the tab text under "Name", enter the class name under "Class" (for example, AdminYourTab), then choose "Customer" as the parent category.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

I spend some time and now I will show complete solution - what we need to do to use back office tab, created by our module.
1. In instalation process we must eval this:

$tab = new Tab();
foreach (Language::getLanguages() as $language) {
     $tab->name[$language['id_lang']] = 'Tab Name';
}
$tab->class_name = 'AdminModuleName'; // you need to write tab code in AdminModuleName.php in module folder
$tab->module = 'modulename'; // module name and folder
$tab->id_parent = 2; / / parent tab ID
$r = $tab->save(); // saving your tab
Configuration::updateValue('MODULENAME_TAB_ID', $tab->id); // saving tab ID to remove it when uninstall 


2. When uninstall module :

$tab = new Tab(Configuration::get('MYMESSAGE_TAB_ID'));
$tab->delete();



Hope this information be usefull.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More