This project is read-only.

"Main" nav menu?

Topics: Core, Customizing Orchard, Troubleshooting
Jun 21, 2012 at 7:45 PM

Hi! I'm back on Orchard development after a break of several weeks. I updated to the latest 1.x code and I see there were changes to the menu system. My theme still renders a "main" menu using @Zone(Model.Navigation), but nothing renders. It looks like there is no longer such a thing as a "main" menu, and that now all menus are created equal, and are now named. I created a menu named "Main Menu" and added two link items. How do I render that menu as my site's main menu"? Do I need changes to Layout.cshtml? 


Jun 21, 2012 at 7:46 PM

The migration path is to add a new Widget Menu in the Navigation zone. To be documented soon.

Jun 21, 2012 at 7:52 PM

Thanks. I'm not sure how to add the widget menu. I guess I'll find out when the docs are updated :) 

Jun 21, 2012 at 7:57 PM

Not you ;)

Widget -> Add (in navigation) -> Menu Widget

Title: Main Menu
Uncheck Show Title
Menu: Main Menu


Jun 21, 2012 at 8:22 PM

Thanks, that worked. I didn't have a "Navigation" zone in my theme's Theme.txt, so I had to add one. Menu renders fine now.

One problem is that it seems to skip the last menu item. If I have two, only the 1st displays. If I have three items only the first 2 render, etc. Do you think I've done something wrong, or should I enter an issue for it? 

Jun 21, 2012 at 8:24 PM

There must be a bug I introduced yesterday, I will fix it right now.

Jun 21, 2012 at 8:26 PM

Are you really synced with the latest version actually ? It seems ok for me.

Jun 21, 2012 at 8:43 PM

I was three commits behind from the latest, but I'm on the latest now (f6e48f5fa5197941f021333feb7615a6452b08e7), and the last menu item still isn't displaying. 

Jun 22, 2012 at 7:41 PM

Update: after restarting visual studio I no longer see this issue. thanks for the help!