public TaxonomyNode GetSitemapItem(ILocalization localization) { try { var ns = localization.Namespace(); var publicationId = localization.PublicationId(); var tree = SitemapHelpers.GetEntireTree(Client, ns, publicationId, _descendantDepth); return((TaxonomyNode)SitemapHelpers.Convert(tree)); } catch (GraphQLClientException e) { const string msg = "PCA client returned an unexpected response when retrieving sitemap items for sitemap."; Log.Error(msg, e.Message); throw new DxaException(msg, e); } catch (ApiException) { return(null); } }
public SitemapItem[] GetChildSitemapItems(string parentSitemapItemId, ILocalization localization, bool includeAncestors, int descendantLevels) => SitemapHelpers.Convert( GetChildSitemapItemsInternal( parentSitemapItemId, localization, includeAncestors, descendantLevels ) );