Best Practices to make Dynamic Paging and Query Manager work on NodeJS

I had trouble before setting up dynamic paging on NodeJS and now again, not remembering the solution/best practices to make this work.

The problem: In the paging generator’s settings there is no Offset parameter available, except when set in the query manager on the same (content) page:

Main question: What’s best practice for location of query parameters and the query managers when on NodeJS with layout and content pages? More specific:

  • Best to “Define Query Params” on layout page or content page or in the query manager?
  • Best to place the Query Manager on layout or content page?

The docs on this topic are quite detailed, but don’t contain on answer to these questions.

Thanks for answers in advance.

Of course, after submitting my question for help here after a few frustrating hours, I found the solution :grimacing:

For future reference to anyone struggling with this:

  1. Define the Query Parameters on the layout page “App” element (“offset” for dynamic paging for example).
  2. Place the Query Manager element on the Layout OR Content Page (works both, as long as step 3 is done if the Query Manager is placed on the content page. On the layout page the query params are automatically available in the Query Manager if it’s placed there).
  3. If you placed the Query Manager on the content page, add the same parameters as in Step 1. to the Query Manager and it will work as well.

Hope this saves some people lots of frustration and community browsing for answers… :slight_smile:

1 Like