2

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.

4

1 回答 1

1

我认为这可能是形状跟踪器中的一个错误。

对于 Orchard 中的内容选择器菜单项,您需要覆盖:

MenuItemLink-ContentMenuItem.cshtml

原文可以在:

~/Modules/Orchard.ContentPicker/Views/

于 2013-07-16T10:04:37.967 回答