2
votes

I'm trying to create a custom theme that uses a bit different markup for the Navigation Menu in orchard 1.6.

Some weird things are happening that I don't quite understand.

When using the Shape Tracer over the Navigation menu, I see the Menu Items are using the MenuItemLink shape. Located in ~/Core/Shapes/Views/MenuItemLink.cshtml.

When looking at the template, it shows this.

<a href="@Model.Href">@Model.Text</a>

But chaning this template in the source, or creating an alternate, seems to have no effect on the rendered HTML. The template changes in the shape tracer, but the HTML does not.

Is the shape tracer wrong and it's not using that template? Why is that template even there if it doesn't do anything.

My main question is not so much how do I change the menu navigation, but why is this happening, are there lots of pieces of Orchard that behave like this? Is the menu an exception? Or did I do something wrong?

It is quite frustrating after learning about overriding shapes and using alternate files to find out that the first time you try using them they don't work the way they were explained to you.

1
Have you posted this on orchard.codeplex.com/discussions Kyle? You might (just might) get a better response. Good luck!Ben Power

1 Answers

1
votes

I think this might be a bug in the shape tracer.

For content picker menu items in Orchard you need to override:

MenuItemLink-ContentMenuItem.cshtml

The original can be found in:

~/Modules/Orchard.ContentPicker/Views/