Share » Forums » Setup & design » Setting Left menu (treemenu) to...

Setting Left menu (treemenu) to another nodeId

Setting Left menu (treemenu) to another nodeId

Wednesday 06 December 2006 7:12:08 am - 2 replies

Author Message

Jon Staines

Friday 08 December 2006 8:02:35 am

The menu.ini setting being used in this template is just set to limit which classes will be included in the menu. The line:

ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' )

means look in menu.ini (and any of the menu.ini overrides or siteaccess files), find the section starting with MenuContentSettings, and look at the value of LeftIdentifierList. So in the menu.ini.append.php for that siteaccess you will find a section called MenuContentSettings similar to:

[MenuContentSettings]
TopIdentifierList[]
TopIdentifierList[]=folder
LeftIdentifierList[]=feedback_form
LeftIdentifierList[]
LeftIdentifierList[]=folder
LeftIdentifierList[]=news_folder

Which would mean that only nodes which were of the class folder or news_folder would appear in the left menu.

I think the

is_set( $module_result.node_id )|choose( 2, $module_result.node_id )

provides some kind of fallback mechanism so that it uses the root node 2 if the module_result is empty. Hopefully somebody else can provide a better explanation for how it works. Its ugly but you could always hard code the node id you want the tree to start at:

{let docs=treemenu( $module_result.path,
                    xxxxx,
                    ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
                    0, 5 )
                    depth=1
                    last_level=0}

Where xxxxx is the node id that is the top of the tree.

Olav Bringedal

Thursday 21 December 2006 2:11:04 am

node_id is deprecated from treemenu for newer versions, so changing $module_result.path is the way to go


Senior Consultant
http://Umoe-consulting.no

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

36 542 Users on board!

Forums menu