WebsiteBaker Support (2.8.x) > Templates, Menus & Design
How to create new admin tab ?
(1/1)
crnogorac081:
Hi,
I would like to add another Menu item at WB Backend (Pages, Media,Add-ons...) For example to call it Dashboard. For example: I have multilang. site with multiple news groups on different pages. Now I would like that user cannot see Pages menu and my page tree, or that user doesnt have to open each news page to add new news.. I would like to make him additional tab - Dashboard where he could add a new post to selected group, activate comments etc.. This is just a basic idea, and this could be very useful for lot of things..
Now, my concerns are how to make this. This tab for example called "Dashboard" should appear at Access-> Groups (to check on checkbox to give access for this group like: Admin tools, Pages, Media etc..) , then it must appear at top menu etc..
I have no idea how to make this ??
I created a folder called "dashboard" in admin/ folder with following code in index.php :
--- Code: ---
require('../../config.php');
require_once(WB_PATH.'/framework/class.admin.php');
$admin = new admin('Dashboard','dashboard');
// Setup template object
$template = new Template(THEME_PATH.'/templates');
$template->set_file('page', 'dashboard.htt'); <--------- with a simple html in it..
$template->set_block('page', 'main_block', 'main');
// Insert values into the template object
$template->set_var(array(
'SOMETHING' => 'Hi',
'TEST' => 'Testing this..'
)
);
// Parse template object
$template->parse('main', 'main_block', false);
$template->pparse('output', 'page');
// Print admin footer
$admin->print_footer();
--- End code ---
but it returns "Insufficient privelliges to be here"..
Could someone point me to right direction..
cheers
Ivan
Navigation
[0] Message Index
Go to full version