GetPage Pagination

GetPage is a very useful extra for Modx that allows the pagination of results, most of the time generated by the GetResources extra.

It’s pretty straightforward to use however by default there isn’t really any thought given to the duplication that will result from it’s use.

There doesn’t seem to be much about this on the net either, it’s pretty straight forward to fix though, you just need to include a small statement within any area you want to make unique (such as the title tag):

[[!+page.nav:isnot=“:then=` – Page [[+page]]`]]

The “then=” bit can of course be anything you want but does need to have some unique element to it and – Page number is an obvious choice.

In order to make sure this works correctly though any call needs to placed after the getpage snippet as this is processed post GET. One way round this is to place the getpage snippet right at the top of the template and use the &toplaceholder variable then use the appropriate placeholder in the area you want the snippet results to appear.