I have the following:
@Html.NavLinks(@Model.menuItems, (string)ViewBag.FilePath)
Now I would like to add another parameter that’s based on the user’s role
User.IsInRole("Admin")
User.IsInRole("Guest1")
User.IsInRole("Guest2")
Is there an easy way I could do this?
With the info you provide I can think of extending the helper NavLink in one of two way: