4

I've read that pagination is supported by the Connector Framework and in my code, I've incorporated the paginationData sent to the connector to be able to get different page data from the External Provider. In testing, I'm able to get different pages to load when I hard code different page indices, but when using this in the CMS, the controls for the page navigation are grayed out and won't send new data to the connector to get the other pages.

I have example code from another connector that is able to successfully use these tools, but when I compare my code to the working one, I don't see anything meaningfully different.

I'm wondering if this is less of a question of code and more of a question of a configuration somewhere not being set properly.

We are currently using Tridion 9.1.

2
  • Chrisrain, can you share the version of tridion that you are using
    – Anand N S
    Jul 16, 2021 at 7:26
  • Sure. We are using 9.1. Jul 16, 2021 at 12:49

1 Answer 1

5

I found what I was doing wrong. When returning the IEntityPaginatedList, I need to make sure to include a value for TotalCount. Here's what I am now returning.

IEntityPaginatedList list = new EntityPaginatedList
        {
            StartIndex = 0,
            PageIndex = paginationData.PageIndex,
            PageSize = config.pageSize,
            Entities = entities,
            TotalCount = total
        };

I suspect what the CMS is doing is it is checking the values provided for Total count and dividing that by the value of PageSize to determine how many pages should exist and checking that number against your PageIndex to see if the next or previous button should be active.

1
  • Please Accept your own Answer. Jul 20, 2021 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.