public virtual ActionResult RootToc(int publicationId, string conditions = "") { try { SetupLocalization(publicationId); if (!string.IsNullOrEmpty(conditions)) { AmbientDataContext.CurrentClaimStore.Put(UserConditionsUri, conditions); } TocProvider tocProvider = new TocProvider(); return(Json(tocProvider.GetToc(publicationId))); } catch (Exception ex) { return(ServerError(ex)); } }
public virtual ActionResult Toc(int publicationId, string sitemapItemId, string conditions = "", bool includeAncestors = false) { try { SetupLocalization(publicationId); if (!string.IsNullOrEmpty(conditions)) { AmbientDataContext.CurrentClaimStore.Put(UserConditionsUri, conditions); } TocProvider tocProvider = new TocProvider(); var sitemapItems = tocProvider.GetToc(publicationId, sitemapItemId, includeAncestors); return(Json(sitemapItems)); } catch (Exception ex) { return(ServerError(ex)); } }