Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8901

Exclude all nested children of unpublished nodes in a QueryProvider

$
0
0
Hi, given the following query as an example:var menuItems = MenuItemProvider .GetMenuItems() .Path(path, PathTypeEnum.Children) .NestingLevel(maxDepth) .LatestVersion(_latestVersionEnabled) .Published(!_latestVersionEnabled) .OnSite(SiteContext.CurrentSiteName) .Culture(_cultureName) .CombineWithDefaultCulture() .OrderByAscending(@NodeOrder@); How would I exclude all descendant nodes in cases where a parent is unpublished. There can be multiple levels and the unpublished parent node might be in any of those.

Viewing all articles
Browse latest Browse all 8901

Trending Articles