This project is read-only.

Overriding the core Menu Shape

Topics: Customizing Orchard, Writing themes
Jul 31, 2012 at 5:21 PM

Hi guys,

I want to override the template for the /Orchard.Core/Shapes/Views/Menu.cshtml shape in my theme. I was hoping I could create the structure /Shapes/Views/Menu.cshtml in my theme and Orchard would pick it up, but looks like I need to do something more crafty. Do I add a Shapes.cs file in my theme to achieve this?

The purpose is just to add a couple of extra divs around the <ul> element to support our layout. I could just add them to our layout file, but all our menus will need them so I'd prefer to override the shape template. I was hoping the markup would be in the Parts.MenuWidget.cshtml file actually.


Jul 31, 2012 at 5:32 PM

No, that should just work. Are you sure your theme is active?

Jul 31, 2012 at 5:44 PM

Ah, my mistake was I needed to place the partial in /Views rather than /Shapes/Views