Share » Forums » Developer » how to create custom tab with submenu...

how to create custom tab with submenu in admin interface

how to create custom tab with submenu in admin interface

Wednesday 08 February 2006 11:00:48 am - 5 replies

Author Message

Bruce Morrison

Wednesday 08 February 2006 2: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

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Vytautas Germanavičius

Wednesday 08 February 2006 11:09:51 pm

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...

{set-block scope=root variable=cache_ttl}0{/set-block}

Łukasz Serwatka

Wednesday 08 February 2006 11:25:34 pm

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.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Bruce Morrison

Thursday 09 February 2006 3:09:22 pm

Hi Vytis & Lukasz

@Lukasz
This is something I posted as a suggestion back in May 05
http://ez.no/community/bugs/ability_to_include_extension_specific_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

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Łukasz Serwatka

Thursday 09 February 2006 11:44:29 pm

Hi Bruce,

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

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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

36 542 Users on board!

Forums menu