eZ Community » Forums » Developer » how to create custom tab with submenu...
expandshrink

how to create custom tab with submenu in admin interface

how to create custom tab with submenu in admin interface

Wednesday 08 February 2006 8:00:48 pm - 5 replies

i have extension which hase several functions.
How to make theese function acessible from menu in admin interface.

Wednesday 08 February 2006 11:22:20 pm

Hi Vytis

You need to add a menu.ini.append.php to the settings directory of your extension.

<?php /* #?ini charset="iso-8859-1"?
[NavigationPart]
Part[ezformsnavigationpart]=Forms

[TopAdminMenu]
Tabs[]=[modulename]

[Topmenu_[modulename]]
NavigationPartIdentifier=ez[modulename]navigationpart
Name=[Text you want to appear on tab]
Tooltip=[Tooltip when you mouse over the tab]
URL[]
URL[default]=[URL to extension main function]
Enabled[]
Enabled[default]=true
Enabled[browse]=false
Enabled[edit]=false
Shown[]
Shown[default]=true
Shown[navigation]=true
Shown[browse]=true

*/ ?>

To ensure the Tab is selected when you are within your extension you need to define the function views in modules/modulename/module.php like this

$ViewList["setup"] = array(
    'functions' => array( 'edit' ),
    "script" => "setup.php",
    "params" => array( ),
    "default_navigation_part" => 'ez[modulename]navigationpart'
);

in all examples [modulename] (including [] ) should be replaced with your module name.

HTH

Cheers
Bruce

Thursday 09 February 2006 8:09:51 am

tab in the top - it's easy. i found description how to do it in documentation.
Thing what i missed - how to craete submenu in the left side. I need it , because my extension has several function and i cannot put everything to top menu.
Looked to all ini files, and php files, but i did not found where it is created.
I cannot believe, that menu is hardcoded to templates...

Thursday 09 February 2006 8:25:34 am

This is currently not supported by eZ publish 3. If you want to add right sub-menu you need to edit design/admin/templates/pagelayout.tpl template.

Friday 10 February 2006 12:09:22 am

Hi Vytis & Lukasz

@Lukasz
This is something I posted as a suggestion back in May 05
http://ez.no/community/bugs/abili...c_left_hand_menus_in_admin_interface

Do you know if there is any chance that this may be added ? Having modifed pagelayout for admin just for an extension is a real overkill and makes upgrades an issue.

@Vytis
In the meantime I end up adding the extension specific menu items to the main content area via an include.

Cheers
Bruce

Friday 10 February 2006 8:44:29 am

Hi Bruce,

Yes, this will be definitely improved in version 4 of eZ publish.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from