Click here to Skip to main content
15,946,342 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I cannot find a working example of using images in a sidebar.cshtml instead of the stock icons supplied with the theme bootstrap template

What I have tried:

CSHTML
<a href="#" class="menu-link">
				
								@if (menu["icon"] != null)
								{
									^__i class="@menu["icon"]"__^
								}
								@if (menu["label"] != null)
								{
									@menu["label"]
								}
				
				@menu["text"]
				@if (menuChildren.Length > 0)
				{
								class="caret">
				}
</a>


JSON
{
  "controller": "Analytics",
  "action": "Index",
  "icon": "fa fa-chart-pie",
  "text": "Triple Glazed Units"
},
{
  "controller": "Analytics",
  "action": "Index",
  "icon": "fa fa-chart-pie",
  "text": "Heritage Thin Units"
},
{
  "controller": "Analytics",
  "action": "Index",
  "icon": "fa fa-chart-pie",
  "text": "Fire Rated Units"
},
Posted
Updated 24hrs ago

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900