This project is read-only.

MenuItemLink Template Override

Topics: General
Sep 27, 2013 at 11:40 PM

I'm trying to display an image next to the link of every menu. To achieve this I added a Media Library Picker Field to the Content Menu Item Content Type.

I then tried to figure out which .cshtml file should I override to show the image. The one I think is the most obvious to replace is the MenuItemLink.cshtml. So I copied it to my theme and override the content as you can see in the following image:


But as you can see in the next image, though the template has the "Hello world" sentence in a span, it is not rendered in the menu.


Can you please tell me what am I doing wrong?

Sep 27, 2013 at 11:51 PM
Try to put it under Views/Navigation
Sep 30, 2013 at 3:48 PM
BertrandLeRoy wrote:
Try to put it under Views/Navigation
If I put it inside Views/Navigation it loads the default shape view: ~/Core/Shapes/Views/MenuItemLink.cshtml


What else should I try?

Thanks! :)
Sep 30, 2013 at 11:03 PM
Further search led me to this issue:

Is this a confirmed bug then?
Oct 2, 2013 at 9:43 PM
More search lead me to this discussion and the module solved my problem: