<![CDATA[ getPage pagination not working when getPage call is cached - My Forums]]> https://forums.modx.com/thread/?thread=102048 <![CDATA[getPage pagination not working when getPage call is cached]]> https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550067
I have a getPage call which includes pagination as per the example code below. This all works fine when I call the getPage call uncachned - but, to speed up page load, I want to call it cached - if I do this, the pagination does not work - clicking on the 2nd page button brings up the 1st page - it just plain and simply does not work...

Can the pagination not work if the getPage call is cached???

[[!getPage?
   &elementClass=`modSnippet`
   &element=`getResources`
   &parents=`20,32,305`
   &limit=`12`
   &pageVarKey=`page`
   &includeTVs=`1`
   &processTVs=`1`
   &includeContent=`1`
   &tpl=`NewsArticleTpl`
   &tvPrefix=``
   &sortby=`{"publishedon":"DESC"}`
   &showHidden=`1`
   &pageNavVar=`Both.nav`
   &includeTVList=`myTVs`
    ]]


    <div class="paging">
    <ul class="pageList">
    [[+Both.nav]]
    </ul>
    </div>


Anyone any ideas?

e.g. changing the code to below means the pagination fails:

[[getPage?
   &elementClass=`modSnippet`
   &element=`getResources`
   &parents=`20,32,305`
   &limit=`12`
   &pageVarKey=`page`
   &includeTVs=`1`
   &processTVs=`1`
   &includeContent=`1`
   &tpl=`NewsArticleTpl`
   &tvPrefix=``
   &sortby=`{"publishedon":"DESC"}`
   &showHidden=`1`
   &pageNavVar=`Both.nav`
   &includeTVList=`myTVs`
    ]]


    <div class="paging">
    <ul class="pageList">
    [[+Both.nav]]
    </ul>
    </div>

]]>
dubbs Apr 12, 2017, 03:20 PM https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550067
<![CDATA[Re: getPage pagination not working when getPage call is cached]]> https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550086 dubbs Apr 13, 2017, 12:06 PM https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550086 <![CDATA[Re: getPage pagination not working when getPage call is cached]]> https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550080 dubbs Apr 12, 2017, 07:59 PM https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550080 <![CDATA[Re: getPage pagination not working when getPage call is cached]]> https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550070 Quote from: Bruno17 at Apr 12, 2017, 03:24 PM
of course, it can't work, when called cached.
Each page is another request with different results.
But getPage has its own caching.
Read:
https://docs.modx.com/extras/revo/getpage#getPage-CachingProperties

Thanks Bruno - didn't think it could but wanted to check! I tried adding &cache=`1` to the call as a parameter but that didnt seem to work either...?]]>
dubbs Apr 12, 2017, 03:31 PM https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550070
<![CDATA[Re: getPage pagination not working when getPage call is cached]]> https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550069 Each page is another request with different results.
But getPage has its own caching.
Read:
https://docs.modx.com/extras/revo/getpage#getPage-CachingProperties]]>
Bruno17 Apr 12, 2017, 03:24 PM https://forums.modx.com/thread/102048/getpage-pagination-not-working-when-getpage-call-is-cached#dis-post-550069