We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27117
    • 28 Posts
    Hi everyone

    I have a strange behavior with a getPage call with Modx Revo 2.1.3. I have a total of 8 pages with results.

    Here is my call:
    [[!getPage@TBPaging?
         &elementClass=`modSnippet`
         &element=`getResources`			
         &parents=`477,558,599`
         &depth=`4`
         &limit=`10`
         &pageVarKey=`page`
         &pageLimit=`3`
         &includeContent=`0`
         &includeTVs=`1`
         &processTVs=`1`
         &tvPrefix=``
         &tvFilters=``
         &sortby=`pagetitle`
         &sortdir=`DESC`
         &tpl=`SendOverviewWebTV`
    ]]
    
    <div class="pagination">
    <span class="pagination">Seite [[+page]] von [[+pageCount]]</span>
    [[!+page.nav]]
    </div>
    


    Basically, it works fine but the +page.nav area gives me different results. On page 1, I have links to page 2, 3 and 4. On page 2, I have links to page 1, 3, 4, and 5. On page 3, I have links to page 1, 2, 4, 5 and 6. This goes on and on. It seems that it adds always one more page link.

    I thought that I can limit the links with the &pageLimit=`3` parameter but it's not working.

    The page is already online and you can check it out here: http://www.telebaern.tv/test.html

    Any help is appreciated.
      Modx 2.1.3, PHP 5.2
      • 9102 ☆ A M B ☆
      • 318 Posts
      It appears that the pageLimit parameter is limiting not the total number of links, but the number of links before and after each page. Notice that on each page, it displays up to three pages before and after the current page.

      What is the result you want? Maybe try setting the page limit to 2 and see if you prefer that.
        • 27117
        • 28 Posts
        Thanks for your help. I have noticed that as well but it didn't make sense to me because on the first, second and third page it's different. It seems like its counting up until &pageLimit is reached in both ways.

        I prefer a max. of 8 pages but it would be nice if they are already there on the first page.


          Modx 2.1.3, PHP 5.2