Forums / Developer / How to set $navigation_part.identifier?

How to set $navigation_part.identifier?

Author Message

Pesti Pal

Tuesday 25 September 2007 5:24:38 am

I'm developing a module and I have tried in many ways, but i haven't succeeded to set the $navigation_part.identifier variable from the module's view. Could someone tell me the correct way of doing this?

Łukasz Serwatka

Tuesday 25 September 2007 5:46:33 am

You have to setup it in your module view definition:

$ViewList['my_view'] = array( 
            'default_navigation_part' => 'myviewnavigationpart', 
            'script' => 'my_view.php' );

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

André R.

Tuesday 25 September 2007 5:55:11 am

Take a look in module.ini to see how you can assign different module's to a navigation identifier.

Also take a look in menu.ini for how you can set up custom navigation identifier if you want to do that!

EDIT: follow Łukasz Serwatka suggestion, setting navigation identifier in module.ini is for overriding the nevigation identifier set in module.php as Łukasz points out.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Pesti Pal

Tuesday 25 September 2007 7:17:31 am

I have tried every combination of the above, but $navigation_part.identifier doesn't get set. If this should be done automatically i'm pretty sure it's not done.

In the view's php file i have the $Params['default_navigation_part'] set correctly and available.

I have read something like $Result['navigation_part'] has to be set in the view, but that doesn't do the job.