Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys,
I'm trying to use the GetPagedChildren method in the Content Service.
IEnumerable<IContent> newsList = contentService.GetPagedChildren(mainNews.Id, 1, 100, out totalRecords);
The totalRecords amount is correct, and returning the correct amount. However when trying to access the newsList I'm getting an empty array.
Is there something I'm doing wrong?
Many thanks,
Andrew
Hey Andrew
I have the same issue. Did you figured this out??
Best Thomas
I've fallen into the same pitfall as you.
The solution is simple.
The page index starts with 0.
So use this line of code instead if you have less than 100 results:
IEnumerable<IContent> newsList = contentService.GetPagedChildren(mainNews.Id, 0, 100, out totalRecords);
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
GetPagedChildren returning an empty array
Hi guys,
I'm trying to use the GetPagedChildren method in the Content Service.
The totalRecords amount is correct, and returning the correct amount. However when trying to access the newsList I'm getting an empty array.
Is there something I'm doing wrong?
Many thanks,
Andrew
Hey Andrew
I have the same issue. Did you figured this out??
Best Thomas
I've fallen into the same pitfall as you.
The solution is simple.
The page index starts with 0.
So use this line of code instead if you have less than 100 results:
is working on a reply...