In Umbraco 7 you could use IContent in the back office to find content both published and unpublished. A lot of the methods to do this are no longer available e.g. Ancestors, Children, Descendants etc.
Any one know if there is a new way of doing this in V8?
Now you have to use GetPagedChildren(int parentId, long pageIndex, int PageSize, out long totalRecords) and GetPagedDescendants(int parentId, long pageIndex, int PageSize, out long totalRecords) and so on.
IEnumerable<IContent> children = contentService.GetPagedChildren(-1, 0, 1000, out long totalRecords);
Umbraco 8: IContent methods missing
In Umbraco 7 you could use IContent in the back office to find content both published and unpublished. A lot of the methods to do this are no longer available e.g. Ancestors, Children, Descendants etc.
Any one know if there is a new way of doing this in V8?
Cheers,
Marc
Just asking again to see if anyone has experience working with IContent with V8.
Cheers,
Marc
Hi Mark.
Now you have to use GetPagedChildren(int parentId, long pageIndex, int PageSize, out long totalRecords) and GetPagedDescendants(int parentId, long pageIndex, int PageSize, out long totalRecords) and so on.
Hi Bo,
Thanks for the info. Seems a bit of a step backwards, any ideas why they have removed all the helpful methods?
Cheers,
Marc
Hi Mark,
Do you got an solution in v8 to access Ancestors() from IContent ?
if so, do kindly share the alternatives that to be used in v8
Thanks,
Gurumurthy J V
This is really counterproductive for removing calls and not even replacing it with better one.
looks amateur and nonprofessional
is working on a reply...