Turning off multi-level menus

Hi,


We have a design that has navigation down the left hand side - created using a menu_normal design area.



It has a sub menu component to it so that any links below the active menu item are shown. This works well.



There are however a couple of areas of the site where I dont want this to occur (ie dont show any sub items for this particular menu item).



There are a couple of ways we could do this:


  1. Make all the items underneath type 2 - but this requires users to remember to switch the type.
  2. Make triggers so that all items under those areas become type 2 on creation - not perfect - there may be the odd occasion where we'll need deeper type 1 assets.



    But what I really would like to do is to customise the design so that I can apply a different (single tier) design to the appropriate pages. So I created a customisation and set the "side_menu__sub_menu" design area to Print = No. This didnt work - it still shows the items.



    I could create a clone of the design instead and just remove the code I guess, but that solution doesnt seem so elegant.



    Any ideas?



    Thanks,



    Steve

Create two menu design areas but only set one to print. The default has the sublevels configured, the optional one doesn't. So, on pages where you don't want the sublevels, you set print="no" on the main menu design area and print="yes" on the optional one.

Thanks Avi, Nice idea.


Shouldnt see too much of a time hit one that? Does the design still do the processing for a design area that has Print set to "No"?


Yes, it does unfortunately. The query is added in the init code section of the menu, not the paint code. The init code is always added to the parsefile, so Matrix will run the query for both menus, as far as I can tell. It is worth trying to see if this makes a noticable difference to uncached page generation times.