We are using Orchard CMS with a custom theme, which defines its own Layout.cshtml
. We would like to create a placeholder in this layout which should be populated by modules with their own menu items, depending on user permissions.
This is very similar to the admin navigation menu but it should be simpler. We just need the placeholder in the layout to concatenate all the menu entries exposed by the enabled modules in the solution (possibly encapsulating them in an HTML list, but nothing more).
How would you do that?
It looks like Zones should be the way to go, but I can't figure out how modules can populate the zone with elements. Maybe something like a shape provider (similar to the INavigationProvider
), which would be called by the zone display engine (where do you put that code?) to retrieve all shapes to render dynamically, so we can perform a foreach
in the zone markup...