Closed blachawk closed 6 years ago
Ok, I have one solution that works today. I can check the Title
value for each item within a foreach loop. And depending on that value, I can create a custom class name on an attribute. This is probably the easiest way to do it OOTB.
Something like this...
<a href="@item.Url" @(item.Title == "Privacy Policy" ? "class=privacy" : "class=ext")>@item.Title</a>
This process will work, as long as class names is 'predefined' by the developer. But it would be nice if the editor can create one on the fly. Then all I have to do is update my CSS style-sheet with any branding needs.
Thanks!
Thanks for raising this feature request!
I am happy to say there is currently a pull request pending (#15) that will allow you to add any number of custom properties to your Meganav items, including a textfield which could be used to supply the CSS class for your menu item.
In the mean time, the solution you have found by checking against properties returned by the Meganav is unfortunately the best way.
Hope this helps, and thanks again for using the package!
It would be wonderful if editors in Umbraco had the opportunity to include an optional class name for each item in meganav. For each item in meganav, we currently have the option of adding a...
All I want to do is also add the ability to....
Is this something we can easily implement into the package?
My end goal is to have cool stuff like...
or.....
Thanks!