IMPLEMENTED: Feedback for Components: Missing Query Loops

Unfortunately, the implementation has severe drawbacks and there’s no way to resolve it without reworking and enhancing the query loop flexibility in bricks.

Solely providing loop functionality as an element property “query” leads to severe restrictions on creating reusable components and following best practices. It’s simply not possible with Bricks, and also nestable components can’t solve that.

Example
I have an event card component, which is looped on the event archive page. It uses my CPT “events” and ACF fields. To use it with Bricks, the component requires the “query” property and inside the component the start_date, title, location need to be statically tied to the according ACF fields.

  • Immediately the component becomes quite restricted in its reusability and there’s no way to use the component with static data, a different post type e.g. The Events Calendar or looping over a JSON, PHP list etc. (not available anyways).
  • You can’t copy & paste the component and simply reuse it on other sites.

Current state

EventCardComponent(query)

  • Event card with data tied to ACF

Best practice (and expected for upcoming Bricks version):

Special LOOP element to loop event_entry (CPT event and ACF fields)

  • EventCardComponent(event_entry.title, event_entry.startdate, event_entry.location)

Reusable with other data

  • EventCardComponent(title=“My static tilt”, startdate=“My static date”, location=“Here”)

Conclusion
That’s another reason, why my suggestion of an essential shift in Bricks loops is necessary to avoid a ton of related problems and make Bricks ready for the future. I am sure the existing structure also overcomplicates things on the implementation of Bricks itself and adds to the long development cycle e.g. for the components.
Hopefully, we see the long necessary switch in Bricks 2.0 as there’s nothing more essential than query loops and components for efficient development.

P.S. Etch will do it right and provide a special loop element. If Bricks doesn’t wake up and provide an improvement on the essential query loos, I have to jump off the boat.