Customizing Menu Item - Adding Css Class

Topics: Customizing Orchard
Apr 11, 2013 at 8:26 PM
Hi, I'm trying to wrap my head around how to add a simple Css Class field to Menu items to allow my Theme to render an image for certain menu items. What I thought would make sense was to add a content part

Image

And then add it to Content Menu Item and CustomLink

Image

When I go to my menu editor, I now see the CssClass field and I can enter the value just fine for a menu item

Image

But when I want to use it in MenuItem.cshtml, I am really unclear how I convert from the Model to the SRBMenuItem part to retrieve the CssClass field.....
Coordinator
Apr 12, 2013 at 1:23 AM
Probably something like Model.ContentItem.SRBMenuItemPart.CssClass.Value
Apr 15, 2013 at 6:30 PM
Thanks.

This worked
Model.Content.ContentItem.SRBMenuItemPart.CssClass.Value;