I would like to add icons from Font Awesome to my sitemap. I want to store related classes in my node and then, in my menuHelperMode.cshtml assign this class to related place holder:
<mvcSiteMapNode title="Documents" controller="Documents" action="Index" iconClass ="fa fa-file-text"/>
From what i have seen so far, i assume it can work, however i can't find a method how can i access this custom node in my .cshtml file. I have tried this (as mentioned in related question):
<div class="@("circle " + child["iconClass"])">
But it can not be indexed like [""] here. I think, it works for binding events only. So my question is, how can i access my custom node attribute directly from cshtml Razor layout?
Attributes of the node can be accessed via Attributes property: