Search code examples
phppaginationmodx-revolutiongetresource

Pagination in modx revolution with different page limits for different pages


I was working with getResources and getPages for pagination. Now, I have a requirement that the first page has 6 child Resources and the further pages have 9 child Resources each. I tried manipulating with the limit parameter, but didn't get the results. Is there some way or the other to do the thing using getResources and getPages? Any other method that can be helpful as well.

Thanks in advance.


Solution

  • &pageOneLimit can be used to set different page limit for first page. it is added in the get page version 1.2.2-pl.so upgrade it use it..

    [[!getPage? &element=getResources &limit=9 &pageOneLimit=6 &tpl=whatever ]]