@model NavigationModel @using SmartStore.Core.Domain.Catalog; @using SmartStore.Web.Models.Catalog; @using SmartStore.Collections; @functions { private string GetCssClassForNode(NodePathState state) { var liClasses = new List(); if ((state & NodePathState.Parent) == NodePathState.Parent) { liClasses.Add("parent"); } if ((state & NodePathState.Expanded) == NodePathState.Expanded) { liClasses.Add("expanded"); } if ((state & NodePathState.Selected) == NodePathState.Selected) { liClasses.Add("selected"); } return liClasses.Count > 0 ? String.Join(" ", liClasses) : null; } private bool ShouldRenderChildren(NodePathState state) { if (!((state & NodePathState.Parent) == NodePathState.Parent) || !Model.Path.Any()) return false; if ((state & NodePathState.Expanded) == NodePathState.Expanded || (state & NodePathState.Selected) == NodePathState.Selected) { return true; } return false; } } @if (Model.Root.HasChildren) {
@T("Categories")
} @helper CreateMenu(IEnumerable> nodes, string menuSelector) { }