Forums / Setup & design / Make custom tab in admin area 'active'

Make custom tab in admin area 'active'

Author Message

Aleksander Lech

Wednesday 28 September 2005 2:18:22 am

Hi,
I made custom admin siteaccess and edit menu.ini.append.php to hide some tabs in top menu.
Then - according to comments in menu.ini.append.php created new tab. Everything works - i mean tab is shown, link works correctly, but tab isn't active.
and is recognized as part of 'ezcontentnavigationpart' not 'ezbwnavigationpart' which is the name I use in [NavigationPart] of ini file.

Where else should I make modifications?

TIA
Aleksander

Aleksander Lech

Thursday 29 September 2005 3:35:54 am

I found that navigationpart_identifiers starting with 'ez' are reserved for ez Publish, but changing the name to 'bwnaw' made no change

Aleksander

Aleksander Lech

Thursday 29 September 2005 11:45:23 pm

Still no progress in my problem with custom tab in admin siteaccess.

I found in eznavigationpart.php that:
<i>
Will return the navigation part array if the identifier is valid, the default will be returned if the identifier is not valid
</i>

But what is valid identifier?

later in the same file:
<i>The list is cached in the global variable eZNavigationPartList.</i>

My custom identifier is in that variable, but doesn't work - tab has still 'inactive' style and variable $menu_item.navigationpart_identifier is set to 'ezcontentnavigationpart' which is default navigationpart identifier.

What am I doing wrong?

Aleksander

Bruce Morrison

Friday 30 September 2005 1:28:10 am

In your module.php you need something like:

$ViewList["edit"] = array(
    'functions' => array( 'read','edit' ),
    "script" => "edit.php",
    'unordered_params' => array(),
    "default_navigation_part" => 'ezbwnawnavigationpart'
);

Of course the values in menu.ini need to reference 'ezbwnavigationpart'

I'm pretty sure that the navigation parts can start with ez (thereis nothing in the code stoping this).

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

Aleksander Lech

Friday 30 September 2005 1:37:06 am

Wow!
Thank you Bruce - it was so simple :)
Everything looks great now!.

Aleksander