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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 22:22:23
Script start
Timing: Jan 30 2025 22:22:23
Module start 'layout'
Timing: Jan 30 2025 22:22:23
Module start 'content'
Timing: Jan 30 2025 22:22:23
Module end 'content'
Timing: Jan 30 2025 22:22:23
Script end

Main resources:

Total runtime0.0261 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.2500151.2266
Module start 'layout' 0.00580.0036 739.4766220.7188
Module start 'content' 0.00940.0152 960.19531,001.9297
Module end 'content' 0.02460.0014 1,962.125033.9922
Script end 0.0260  1,996.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.0742140.0002
Check MTime0.00114.2175140.0001
Mysql Total
Database connection0.00082.980910.0008
Mysqli_queries0.00228.351930.0007
Looping result0.00000.054010.0000
Template Total0.00093.610.0009
Template load0.00082.931510.0008
Template processing0.00020.686910.0002
Override
Cache load0.00051.945510.0005
General
dbfile0.00207.631180.0002
String conversion0.00000.031140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs