Answer the question
In order to leave comments, you need to log in
How to organize pagination on MODX?
Hello, please tell me what I'm not doing wrong when I try to build pagination.
[[pdoResources?
&limit=`0`
&depth=`1`
&includeTVs=`imageUsluga`
&parents=`2`
&includeContent=`1`
&tpl=`uslugiTpl`
&sortby=`publishedon`
&sortdir=`DESC` ]]
[[pdoPage?
&tpl=`@INLINE <p>[[+idx]] <a href="/[[+uri]]">[[+pagetitle]]</a></p>`
&limit = `2`
]]
[[+page.nav]]
[[+pageCount]]
Answer the question
In order to leave comments, you need to log in
[[!pdoPage?
&cache=`1`
&cacheTime=`1800`
]]
[[!+page.nav]]
Somehow it's strange, I combined pdoResources and pdoPage and it worked, somehow strange and wrong, this chunk broke in other places now .... :c
[[!pdoPage?
&limit=`4`
&tpl=`uslugiTpl`
&includeTVs=`imageUsluga`
&includeContent=`1`
]]
<div class='pagination'>[[!+page.nav]]</div>
Site on Modx revo. Pagination via [[!+page.nav]]. After connecting SEOPro, oddities began ...
Pagination does not work if, when switching from https://petrovich-design.ru/web-design , I scroll to the next page, the system substitutes the address of the section in the path to the resource once again in the form https://petrovich- design.ru/ web-dizajn /web-dizajn/?page=2
If we remove the repetition of the section, then the URL of the form https://petrovich-design.ru/web-dizajn/?page=2 opens page 2 as expected ...
T. e. it turns out that the navigation tries to duplicate the section alias and substitutes it in the URL as a nested link, although "nested URLs" are disabled in the system ...
How to remove it from there someone is stupid ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question