@using System.Text @using Abp.Application.Navigation @using Abp.Collections.Extensions @using WePlatform.Views @model WePlatform.Models.Layout.SideBarNavViewModel @{ var pageTitleStr = ""; var calculateMenuUrl = new Func((url) => { if (string.IsNullOrEmpty(url)) { return ApplicationPath; } if (UrlChecker.IsRooted(url)) { return url; } return ApplicationPath + url; }); string MenuHtml(UserMenuItem menuItem) { if (menuItem==null) { return ""; } StringBuilder sb = new StringBuilder(); var active = Model.ActiveNames == null ? "" : (Model.ActiveNames.Contains(menuItem.Name) ? "active" : ""); sb.AppendFormat("
  • ", active); sb.AppendLine(); string iconHtml = string.IsNullOrWhiteSpace(menuItem.Icon) ? "" : " "; if (menuItem.Items.IsNullOrEmpty()) { sb.AppendFormat("{1}{2} ", calculateMenuUrl(menuItem.Url), iconHtml, menuItem.DisplayName); sb.AppendLine(); } else { sb.AppendFormat("{0}{1} ", iconHtml, menuItem.DisplayName); sb.AppendLine(); sb.Append(""); sb.AppendLine(); } sb.Append("
  • "); sb.AppendLine(); return sb.ToString(); } } @if (Model != null && Model.PageTitles.Any()) { foreach (var pageTitle in Model.PageTitles) { pageTitleStr += "
  • >
  • " + pageTitle.Name + "
  • "; } } @**@ @**@