0
我有如下這種結構的菜單:基於角色的菜單
<div id="sidebar-menu">
<ul>
<li class="active">
<a href="index.html" class="design active"><i class="icon-employee"></i><span> Employees </span></a>
</li>
<li>
<a href="Holiday.html" class="design"><i class="icon-holiday"></i><span> Holidays <span class="badge">6</span></span></a>
</li>
<li class="has_sub">
<a href="javascript:void(0);" class="design"><i class="icon-time"></i> <span> Time & Attendance </span> <span class="pull-right"><i class="mdi mdi-plus"></i></span></a>
<ul class="list-unstyled">
<li><a href="incident.html">Incidents</a></li>
<li><a href="hour.html">Hours</a></li>
<li><a href="pass.html">Passes</a></li>
<li class"active"><a class"active" href="disability.html">Disabilities</a></li>
</ul>
</li>
</ul>
</div>
有一個關於如何創建它,但它只是一個一級菜單的好文章,這裏是一個二級菜單。 http://techbrij.com/role-based-menu-asp-net-mvc
我想根據用戶角色或驗證動態顯示它。
任何線索或示例如何做到這一點?