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 NS
    Jul 16 at 7:26
  • Sure. We are using 9.1. Jul 16 at 12:49
4

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

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.