menu.ini.append

Author Message

David Santiso

Saturday 18 June 2011 10:30:10 am

Hi,

I have different contents of some class in my site. I wanted show a menu option to this contents and I added the class identifier in menu.ini.append.

The problem is that I want display a menu option to only some contents of the same class now, but not all.

¿How can I do it?

Thanks,

David

Tomislav Buljević

Monday 20 June 2011 3:25:42 am

Hello,

What kind of content are we talking about here? Is it something for the admins eyes only or...?

If it's something you want to hide in one view (full), just make another view which will contain the content you wish it to display, and comment it in the full view. If it's something that should be restricted to certain users, then modify the Roles and Policies in the Administration.

It would be useful to clarify what exactly is that we're talking about here so I could be of further help.

Best regards,

Tomislav

David Santiso

Monday 20 June 2011 3:57:04 am

I have two "frontpage" nodes in Home. This nodes show different content. For one of them, i want to show the content to the member. For the second node, I only want to save the content (without showing it).

To hide the menu option, I've tried changing the permissions, but then the member doesn't have access from anywhere. I only have to hide it from main menu.

Thanks,

Tomislav Buljević

Monday 20 June 2011 4:13:36 am

So, what you're basically trying to do is hide a node in eZ Publish so it doesn't appear on the menu? OK, so try this:

$excluded_nodes=array('put_in_a_list_of_excluded_nodes_here');
$top_menu_items=fetch( 'content', 'list', 
     hash( 'parent_node_id', $root_node.node_id,
              'sort_by', $root_node.sort_array,
              'class_filter_type', 'include',
              'class_filter_array', ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ),
              'attribute_filter', array(array('node_id', 'not_in', $excluded_nodes)) ) ) 

You won't be able to access the nodes on the list through the menu, but you will be able to do so via url.

Hope this helps,

Tomislav

David Santiso

Tuesday 21 June 2011 12:57:10 pm

I want this.

Thanks ;)

David

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