Beispiel #1
0
 public static IHtml RenderItem(NavCollection coll, NavItem nv)
 {
     return
     "li".Add(
             "a".Add(nv.Text).Attr("href", nv.Href))
         .AddClassIf(coll.ActiveAction == nv.Action, () => "active");
 }
Beispiel #2
0
 public static IHtml SideBar(NavCollection coll)
 {
     return
     "ul.nav.nav-list".Add(
         coll.Items
             .Where(nv => !nv.IsHidden)
             .Select(nv => RenderItem(coll, nv)));
 }