This project is read-only.

How to set Menu class attribute?

Topics: Customizing Orchard
May 11, 2012 at 4:40 PM

    // Model is Model.Menu from the layout (Layout.Menu)
    var tag = Tag(Model, "ul");    

        @* see MenuItem shape template *@


I'm very new to the Orchard project, so.......

I am trying to change the menu display using the code above in my  customize Menu.cshtml template.

This works, but I don't uderstand how the Model.Classes is initially populated.


I'm not sure if this is the correct approach to customizing the look of the Menu.

Any help appreciated.



May 12, 2012 at 9:39 PM

Model.Classes can be seeded by pretty much anything that runs before the view gets rendered. Typically, it can be the parent shape, or the driver. What you've done looks fine.

May 14, 2012 at 8:48 AM

I'm new to Orchard, so It's good to be reassured I'm doing it right.

Thanks for your help.