Hello.

Tell me, please, what am I doing wrong when I try to build a pagination.

[[pdoResources? &limit=`0` &depth=`1` &includeTVs=`imageUsluga` &parents=`2` &includeContent=`1` &tpl=`uslugiTpl` &sortby=`publishedon` &sortdir=`DESC` ]] 

I bring resources to the page (I have 8 of them), everything is okay!

But now I want resources not all derived, but, for example, 2 pieces each and with pagination. So, I do:

  [[pdoPage? &tpl=`@INLINE <p>[[+idx]] <a href="/[[+uri]]">[[+pagetitle]]</a></p>` &limit = `2` ]] [[+page.nav]] [[+pageCount]] 

I have 4 links displayed (limit = 2 is logical, and 8 = 4 pages of resources), BUT these links lead ?page=НОМЕР how would the pagination appear to be, but it doesn’t work, what am I doing wrong?

And yes, it displays something strange ...

alt text

The last 4 is the [[+pageCount]] , but the first "Service 3" ... from where they got out ...

Thanks in advance for help.

    1 answer 1

    Somehow it is strange, I combined pdoResources and pdoPage - and it worked, somehow strangely and incorrectly, this chunk broke in other places now ....: c

     [[!pdoPage? &limit=`4` &tpl=`uslugiTpl` &includeTVs=`imageUsluga` &includeContent=`1` ]] <div class='pagination'>[[!+page.nav]]</div> 
    • getResources (pdoResources) - do NOT work with getPage (pdoPage) pagination getPage (pdoPage) - work with pagination - mountpoint