<![CDATA[ getResources to pdoResources - My Forums]]> https://forums.modx.com/thread/?thread=103661 <![CDATA[getResources to pdoResources]]> https://forums.modx.com/thread/103661/getresources-to-pdoresources#dis-post-557616 pdoTools 2.11.0

I'm in the process of moving from getResources and getPage to pdoTools.

I have three unique getPage calls on one page, each one corresponds to a specific folder (category) of resources which it correctly displays. Everything works great with getPage. But after switching to pdoPage the pagination breaks.

When a pagination link is clicked (e.g., 2, 3, Next etc.) the page reloads with the correct url (e.g., mysite.com/overview.html?page=2) in the browser address bar but the page (and url) that loads goes back to page one. It won't let me view any other page other than the first one.

I use pdoPage with pagination successfully elsewhere on the same site so I know it works, just not on this particular page.

After some poking around it seems the problem has to do with the multiple calls on one page. With only one pdoPage call on the page the pagination works exactly as expected, but as soon as I add more calls the pagination breaks again.

As I said, it's been working fine with multiple getPage calls so I don't understand what's happening with pdoPage.

Call One:
[[!pdoPage@pdoPagination?
    &elementClass=`modSnippet`
    &element=`pdoResources`
    &parents=`2`
    &resources=`-1`
    &includeTVs=`1`
    &where=`{"createdby:=":[[!+modx.user.id]]}`
    &showHidden=`1`
    &sortby=`publishedon`
    &sortdir=`DESC`
    &tpl=`ArticleResult`
    &hideContainers=`1`
    &limit=`5`
    &pageLimit=`5`
    &toPlaceholder=`articleResult`
    &totalVar=`articlePublished`
    &pageNavVar=`page.nav.article`
    &showUnpublished=`1`
]]

Call Two:
[[!pdoPage@pdoPagination?
    &elementClass=`modSnippet`
    &element=`pdoResources`
    &parents=`3`
    &resources=`-1`
    &includeTVs=`1`
    &where=`{"createdby:=":[[!+modx.user.id]]}`
    &showHidden=`1`
    &sortby=`publishedon`
    &sortdir=`DESC`
    &tpl=`ReviewResult`
    &hideContainers=`1`
    &limit=`5`
    &pageLimit=`5`
    &toPlaceholder=`reviewResult`
    &totalVar=`reviewPublished`
    &pageNavVar=`page.nav.reviews`
    &showUnpublished=`1`
]]

Call Three:
[[!pdoPage@pdoPagination?
    &elementClass=`modSnippet`
    &element=`pdoResources`
    &parents=`4`
    &resources=`-1`
    &includeTVs=`1`
    &where=`{"createdby:=":[[!+modx.user.id]]}`
    &showHidden=`1`
    &sortby=`publishedon`
    &sortdir=`DESC`
    &tpl=`TutorialResult`
    &hideContainers=`1`
    &limit=`5`
    &pageLimit=`5`
    &toPlaceholder=`tutorialResult`
    &totalVar=`tutorialPublished`
    &pageNavVar=`page.nav.tutorials`
    &showUnpublished=`1`
]]
]]>
todd.b Mar 23, 2018, 11:32 PM https://forums.modx.com/thread/103661/getresources-to-pdoresources#dis-post-557616
<![CDATA[Re: getResources to pdoResources]]> https://forums.modx.com/thread/103661/getresources-to-pdoresources#dis-post-557621 todd.b Mar 24, 2018, 04:02 PM https://forums.modx.com/thread/103661/getresources-to-pdoresources#dis-post-557621 <![CDATA[Re: getResources to pdoResources (Best Answer)]]> https://forums.modx.com/thread/103661/getresources-to-pdoresources#dis-post-557618
https://docs.modx.pro/en/components/pdotools/snippets/pdopage]]>
ferx77 Mar 24, 2018, 07:03 AM https://forums.modx.com/thread/103661/getresources-to-pdoresources#dis-post-557618