ContentService.GetAncestors Method

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

Overloads

GetAncestors(int, bool) Get ancestors of the specified content item, starting with the closest parent and ending with the root.
GetAncestors(int, bool) Get ancestors of the specified content item, starting with the closest parent and ending with the root.

GetAncestors(int, bool)

Get ancestors of the specified content item, starting with the closest parent and ending with the root.

public static IEnumerable<Content> GetAncestors(int id, bool filter = true)

Parameters

id
int

Id of the content item.

filter
bool

true to filter out items that are deleted or where the user does not have read access, otherwise false.

Returns

System.Collections.Generic.IEnumerable

Returns a list of objects implementing the Content interface.

GetAncestors(int, bool)

Get ancestors of the specified content item, starting with the closest parent and ending with the root.

public static IEnumerable<T> GetAncestors<T>(int id, bool filter = true)

    where T : Content

Parameters

id
int

Id of the content item.

filter
bool

true to filter out items that are deleted or where the user does not have read access, otherwise false.

Returns

System.Collections.Generic.IEnumerable<>

Returns a list of content items of type T.