Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrew 25 posts 148 karma points
    Jun 21, 2019 @ 12:31
    Andrew
    0

    GetPagedChildren returning an empty array

    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

  • Thomas 315 posts 602 karma points c-trib
    Jul 04, 2019 @ 08:26
    Thomas
    0

    Hey Andrew

    I have the same issue. Did you figured this out??

    Best Thomas

  • Falco P. 2 posts 74 karma points
    Oct 08, 2019 @ 07:58
    Falco P.
    2

    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);
    
Please Sign in or register to post replies

Write your reply to:

Draft