This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » Left menu best practise
expandshrink

Left menu best practise

Left menu best practise

Wednesday 30 December 2009 4:42:31 pm - 1 reply

I am facing a design question regarding the left menu in a new project. In the website interface, as well as some of my previous projects, menu includes are located inside the pagelayout template. Whether it is shown, and when, is configured in menu.ini.

Wouldn't it be more flexible on object level (and also cleaner) to include menu templates inside the appropriate full templates, instead of working with many ini settings and the persistent_variable? Or will this cause cache or performance problems?

Modified on Wednesday 30 December 2009 4:45:03 pm by Sander van den Akker

Tuesday 26 January 2010 12:26:53 pm

Hi Sander,

Having the left menu in the view template means the menu will be view-cached, on a per-node basis. This means that whenever you want to change the content of your menu (adding a menu entry for example), you will need to clear all nodes' view cache...which is not recommended happy.gif Emoticon Another con is that regenerating a node's view cache will take longer for it needs to compute the left menu on top of its own content.

Now that the persistent_variable exists and works fine, information passing between view templates and the pagelayout is actually pretty easy. This can allow for a highly contextual menu. In terms of performance optimization, cache-blocks can be used around the menu, using the appropriate keys and options to have it expire when it is required.

As to the use of menu.ini, it is no dogma. It is indeed shipped with eZ Publish, but its usage is, as most of the other solutions shipped (eZ Flow, eZ Webin), simply an example onhow to best use the features. You may decide to not use it, alleviating some ini configuration.

Hope it helps. Interested in knowing how you actually solved the issue (as your initial post dates a bit).
Cheers and thanks for triggering this discussion,

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from