private void ModWrap(IActivateNavItem lnk) { if (!String.IsNullOrEmpty(this.CSSSelected)) { lnk.CSSSelected = this.CSSSelected; } if ((SiteData.IsFilenameCurrentPage(lnk.NavigateUrl) || AreFilenamesSame(lnk.NavigateUrl, ParentPageNav.FileName)) && !String.IsNullOrEmpty(lnk.CSSSelected)) { lnk.IsSelected = true; } if (GetChildren(lnk.ContentID).Any() && !String.IsNullOrEmpty(lnk.CssClassHasChild)) { if (!String.IsNullOrEmpty(lnk.CssClassNormal)) { lnk.CssClassNormal = lnk.CssClassNormal + " " + lnk.CssClassHasChild; } else { lnk.CssClassNormal = lnk.CssClassHasChild; } } }
private void UpdateHyperLink(Control X) { foreach (Control c in X.Controls) { if (c is IActivateNavItem) { IActivateNavItem lnk = (IActivateNavItem)c; ModWrap(lnk); UpdateHyperLink(c); } else { UpdateHyperLink(c); } } }