getPage in Modx 3.0.0, page nav not appearing

I seem to be having a strange issue with getPage in Modx 3.0.0. The paging is working 100%, I can navigate between the pages by manually updating the URL. My problem is when attempting to display the page navigation.

My getPage call is below:

[[!getPage?
    &elementClass=`modSnippet`
    &element=`pdoResources`
    &parents=`70`
    &sortby=`[[!propertySort]]`
    &tpl=`[[!propertyTpl]]`
    &includeTVs=`display,street,locality,town,postcode,bedrooms,bathrooms,property_type,price,price_display,rm_qualifier,media,price_qualifier`
    &processTVs=`1`
    &where=`{"template:=": "7"}`
    &tvPrefix=``
    &limit=`20`
    &pageNavVar=`page.nav`
    &totalVar=`totalProperties`
 ]]
        
<div class="pageNav">[[!+page.nav]]</div>

This outputs as below:
Screenshot 2022-12-13 at 23.32.53

Is there anything I need to do differently in Modx 3 / something I’ve missed?

It seems to work correctly using pdoPage and pdoResources

[[!pdoPage?
    &elementClass=`modSnippet`
    &element=`pdoResources`
    ...
]]

or getPage and getResources

[[!getPage?
    &elementClass=`modSnippet`
    &element=`getResources`
    ...
]]

But I don’t know (yet) why the combination of getPage and pdoResources fails.

Thank you that’s done the trick! Never noticed pdoTools cam bundled with a paging snippet also, will use in the future

It turns out that you have to explicitly set the property setTotal to 1 to make it work using getPage and pdoResources.

[[!getPage?
    &elementClass=`modSnippet`
    &element=`pdoResources`
    &setTotal=`1`
    ...
]]
1 Like

Great to know thank you!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.