Where are nav / menus stored ... is there a way to add new ones based on an existing one

Topics: Core, Customizing Orchard
Mar 29, 2013 at 10:36 AM
I'm going to need to have slightly different menus on more than a few of my pages .... So it looks like I'm going to have to create a lot of different layers and navigation parts.

I don't see a way to copy a navigation menu / re-name it as a new one in the navigation collection ... can it be done in code as a migration ... since the menus structure seems to be stored in the database ...

Similarly I'd like to be able to "clone" and rename layers so that I don't have to do all the work from the admin IDE.

This does seem like a more global type of issue regarding application level metadata. So seems like a similar solution would apply to pages, blogs etc.

Are there code samples on how to do that ... especially navigation parts and layers .. or is there another solution where I don't have to build so many layers, but have different menus on pages defined by the layer filter ?

Thx ..
Mar 29, 2013 at 3:53 PM
I believe Zoltan is working on a copy function that enables you to clone content items. Since menu items are content items too, perhaps he will implement it for that UI section as well.
Another approach you could consider is implementing INavigationProvider and yield your menu items based on whatever business logic you have as a requirement.
The same goes for layers: perhaps you don't need to create as many layers if you implement your own layer rule providers.
It all depends on exact requirements.