NO BUG: Pagination does not work with query loop in post grid component

Browser: Chrome 136
OS: macOS

Steps to reproduce the issue

  1. Create a page for blog posts
  2. Create a component Blog Grid with a query loop of post cards
  3. Expose the Query loop as property
  4. Add a pagination and select Blog card (instance)
  5. → Element does not exists in Builder, no pagination on Frontend

What works is:
When the blog card itself is the component instance and has the Query exposed as parameter.

However, the Query Results Summary element does not show results in any case.

Hi @Maexxx ,

The way you set up is not supported in Component due to certain technical limitation. (The pagination or Query Result element with target query dropdown unable to identify if your target query is from which particular instance)

You can use the 2 methods below to achieve what you want:

  1. Create a component that includes the Grid Query + Query Result Summary + Pagination. Use property + condition to decide whether or not to output the Query Result Summary or Pagination elements.

  2. Create a standalone Query Loop component (Component root itself is a loop, not wrap inside Grid wrapper). Treat it as a looping-card component. Then you can use it like your current setup.

NOTE: If you plan to use Query Filters feature for the target Query, please use Method 2. Because Filter elements wouldn’t work inside the Component. Each filter element must have a unique element ID.

Regards,
Jenn

Hey @itchycode,
I implemented method 2 now, with Blog grid > Blog card (component), but the Query Results Summary element doesn’t work with a component instance.

Hi @Maexxx ,

I can’t replicate the issue.

If you use method 2, The Query Results Summary’s dropdown should allow you to choose the Query with (Element) name.

Otherwise, you can send admin credentials to help@bricksbuilder.io so I can check.

Regards,
Jenn

1 Like

You’re right, today the element is selectable. Thanks. Don’t know what was wrong here.