Default rendering position of Menu

Topics: Customizing Orchard, Writing themes
Apr 19, 2013 at 10:00 AM
Edited Apr 19, 2013 at 10:05 AM
Hello.
As default, Menu Widget is rendered in Navigation Zone (after Orchard deploy. I would like to move it to FirstAside zone.. but programitacally. I know I can go to Dashboard, create new menu widget, link it to main menu, add it to FirstAside zone and then delete it from Navigation. But how can do it programitcally? Or how can force rendering MenuWidget (linked to MainMenu) - without exposing ability to remove it from Dashboard?

Note I do not want to move whole navigation zone. Only Menu widget with main menu.
Apr 19, 2013 at 11:41 AM
You could create a custom recipe file for your deployment based upon the default and change the following line from:

widget create MenuWidget /Title:"Main Menu" /RenderTitle:false /Zone:"Navigation" /Position:"1" /Layer:"Default" /Identity:"MenuWidget1" /MenuName:"Main Menu"

to

widget create MenuWidget /Title:"Main Menu" /RenderTitle:false /Zone:"FirstAside" /Position:"1" /Layer:"Default" /Identity:"MenuWidget1" /MenuName:"Main Menu"

or use the import/export module to create a recipe file based upon your site
Apr 19, 2013 at 11:58 AM
Ok, i got it. But is there a way to create it "as hardcoded" widget - I mean when orchard starts, adds dynamically such a widget?
Apr 20, 2013 at 12:17 AM
As alanevery said, that is the way to add it when Orchard starts.

Recipes can be found in Orchard.Setup/Recipes