Core.Navigation - Clears Alternates

Topics: Core, Troubleshooting, Writing themes
Aug 31, 2012 at 10:31 PM

I've having problems getting the new Core.Navigation to leverage alternates when using Menu Content Items; the other menu items use alternates without a problem.

The only alternate that I've been able to get working with these content items is one titled: "MenuItemLink-ContentMenuItem.cshtml" - I'd rather not use the general version of this and would like to narrow it to the name of the menu - which is called "main-menu".  My "Menu-main-menu.cshtml" works fine - so I know the name of the menu is correct; but I can't seem to get "MenuItemLink-main-menu.cshtml" or "ContentMenuItem-main-menu.cshtml" to work.

While looking at the "MenuItem-main-menu.cshtml" (which is also working - but based from the existing template: MenuItem.cshtml - within the Core.Navigation) - I notice that Alternates are being cleared and the type is being forced to "MenuItemLink" - why is this and is this possibly causing my problem with Shape Tracer and even manually trying to figure out the proper name for the alternate to use?


Sep 12, 2012 at 10:59 PM

This is a common technique to change the shape on the fly. It's also used in pagination.