Skip to content

Instantly share code, notes, and snippets.

@zealott
Created October 30, 2017 21:33
Show Gist options
  • Select an option

  • Save zealott/673cf850ef34f7e2582eb5d18da8ca0d to your computer and use it in GitHub Desktop.

Select an option

Save zealott/673cf850ef34f7e2582eb5d18da8ca0d to your computer and use it in GitHub Desktop.
In order to get a distinct IEnumerable<ICMSLinkElement> collection use _Functions.GetDistinctItems(). Since pages can be tagged with multiple categories this prevents duplicates of the same page in the IEnumerable<ICMSLinkElement> collection.
IEnumerable<ICMSLinkElement> exampleListing = _Functions.GetDistinctItems(Model.GetNavigationItems("NavigationElementName", NavigationElementType.TaxonomyNavigation, false, true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment