private string _GetElement(string page, string title, string view = null, eCrumbType type = eCrumbType.Link) { var href = SitePath + page; if (!string.IsNullOrEmpty(view)) href += "?view=" + view; if (CurrentView == view) type = eCrumbType.Text; return _GetElementTitle(type, href, title, view); }
private string _GetElementTitle(eCrumbType pType, string pHref, string pTitle, string pView) { var result = string.Empty; switch (pType) { case eCrumbType.Link: result = string.Format("<a href=\'{0}\'>{1}</a>", pHref, pTitle); break; case eCrumbType.Text: result = string.Format("<span {0}>{1}</a>", CurrentView == pView ? "class='active'" : string.Empty, pTitle); break; } return result; }