Force pdoPage to have a specific page as the root

Can I somehow force pdoPage to have a specific page as the root of the [[!+page.nav]]?

I am using HTMX and Ajax to fetch a pdo generated resource to a page with lots of filters. (like a API)

However when I trigger a filter and the pdoPage list gets updated, the root URL of the paganisation is changed to the url of the API page…

So in the chunk below I need to define the [[+href]] root somehow.

<a href="[[+href]]" aria-current="page">[[+pageNo]]</a>

It looks like the code just uses the q request parameter (or whatever the system setting request_param_alias is set to) for the page URL.

So your options are probably:

  • Hard-coding the correct page URL in the pageNavTpl chunk (and adding ?page=[[+pageNo]])
  • Using a snippet/output-modifier in pageNavTpl to change the value of [[+href]]
  • Changing $_REQUEST['q'] before calling pdoPage (and hoping this has no side-effects).