Modx - Collections: Get Selections paginated with pdoTools

419 views Asked by At

How to output Selections children with pagination using pdoTools (pdoResources & pdoPage) and getSelections. See my answer below.

1

There are 1 answers

0
Gevorg Hakobyan On

Collections comes with its own snippet for Selections: the getSelections, which is by default dependent on getResources. If we want it to work with pdoTools and get paginated, we need to use pdoPage with &element=getSelections together with &getResourcesSnippet = pdoResources.

The code will look like this:

[[!pdoPage?
  &elementClass=`modSnippet`
  &element=`getSelections`
  &getResourcesSnippet = `pdoResources`
- other parameters
]]