Different menus?

Topics: General
Oct 14, 2012 at 2:48 PM

I created a new menu in the navigation section. I selected it in the dropdownlist and added new content links. Save all button pressed. I was kind of expecting to see the new menu appear on my site but it keeps on showing the old one.

What am I doing wrong?

Coordinator
Oct 14, 2012 at 7:30 PM

Add a widget showing the new menu?

Oct 17, 2012 at 8:04 PM

What kind of widget? Html widget? Or...?

Oct 17, 2012 at 8:33 PM
Edited Oct 17, 2012 at 9:33 PM

I was able to add a new Menu widget and it selected the second menu directly. Thanks!

Oct 17, 2012 at 9:34 PM

Ok, that renders out another horizontal menu. Is there an option to render it out vertically? Or does that require another widget?

Coordinator
Oct 17, 2012 at 9:38 PM

Override the template.

Oct 17, 2012 at 10:23 PM
Edited Oct 17, 2012 at 10:29 PM

I installed the shape tracing module. I can create alternates for other shapes but the Menu widget with the alternative widget (create alternative) gives an error message:

Oops. Something went wrong ... sorry

An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back

The error in the log states the following:

filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
2012-10-17 23:27:01,769 [5] Orchard.Exceptions.DefaultExceptionPolicy - An unexpected exception was caught
System.ArgumentException: The relative virtual path 'Orchard.Core.Shapes.CoreShapes::Zone' is not allowed here.
   at System.Web.VirtualPath.FailIfRelativePath()
   at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull)
   at System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath)
   at System.Web.Hosting.MapPathBasedVirtualPathProvider.CacheLookupOrInsert(String virtualPath, Boolean isFile)
   at System.Web.Hosting.MapPathBasedVirtualPathProvider.FileExists(String virtualPath)
   at Orchard.FileSystems.Dependencies.WebFormVirtualPathProvider.FileExists(String virtualPath) in c:\Build\Orchard\src\Orchard\FileSystems\Dependencies\WebFormsExtensionsVirtualPathProvider.cs:line 44
   at System.Web.Hosting.VirtualPathProvider.FileExists(String virtualPath)
   at Orchard.FileSystems.VirtualPath.DefaultVirtualPathProvider.FileExists(String virtualPath) in c:\Build\Orchard\src\Orchard\FileSystems\VirtualPath\DefaultVirtualPathProvider.cs:line 149
   at Orchard.FileSystems.WebSite.WebSiteFolder.FileExists(String virtualPath) in c:\Build\Orchard\src\Orchard\FileSystems\WebSite\WebSiteFolder.cs:line 38
   at Orchard.DesignerTools.Controllers.AlternateController.Create(String template, String alternate, String returnUrl)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__Dis

 

Coordinator
Oct 17, 2012 at 10:57 PM

File a bug with repro steps.

Oct 18, 2012 at 12:25 AM
Edited Oct 18, 2012 at 12:31 AM

The only shapes you will need to override are:

  • /Core/Shapes/Views/Menu.cshtml
  • /Core/Shapes/Views/MenuItem.cshtml
  • /Core/Shapes/Views/MenuItemLink.cshtml

These are just normal shape overrides. As an example, to override the main menu you would create a shape called Menu-main-menu.cshtml in you Themes /Views folder. Just a pointer, add an id or class to the menu and then the rest is just done through CSS.

Oct 18, 2012 at 7:41 AM
bertrandleroy wrote:

File a bug with repro steps.


Done: http://orchard.codeplex.com/workitem/19158. Hopefully one can fix it. All other things alternate generations are working properly.

Coordinator
Oct 18, 2012 at 6:04 PM

Thanks.