<?xml version="1.0" encoding="utf-8" ?> <mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0" xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0 MvcSiteMapSchema.xsd"> <mvcSiteMapNode title="Dashboard" controller="Home" action="Index" description="fa fa-home" /> <mvcSiteMapNode title="Account" controller="Account" action="Index" roles="admin" description="fa fa-envelope"> <mvcSiteMapNode title="Register" controller="Account" action="Register" /> <mvcSiteMapNode title="Log off" controller="Account" action="LogOff" /> <mvcSiteMapNode title="Test1" controller="Account" action="LogOff" /> <mvcSiteMapNode title="Test2" controller="Account" action="LogOff" /> </mvcSiteMapNode> </mvcSiteMap>
<ul> @foreach (var node in Model) { @Html.DisplayFor(m => node) var iconClass = node.Description.ToString(); if (node.Children.Any()) { < i class="@iconClass" aria-hidden="true"></ i> /* this is to show icon */ @Html.DisplayFor(m => node.Children) } } </ul>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)