ContentService.GetDescendants Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

GetDescendants(int, int?, bool)

Returns (a flat list) of descendants for a content item. The items are sorted like a tree.

public static IEnumerable<Content> GetDescendants(int id, int? depth = default(int? ), bool filter = true)

Parameters

id
int

Id of the content for which to get descendants.

depth
int?

The maximum depth of descendants to return, i.e. setting depth to 1 returns only the immediate children. If depth is null, all descendants are returned.

filter
bool

true to filter out items that are trashed or where the user does not have View permission, otherwise false.

Returns

System.Collections.Generic.IEnumerable

Returns a tree-sorted list of Content objects.