Now, to create the loop property and control it, we need to create two properties. One for the Query loop, and one for the Query control. Screenshot
This can be challenging. But as a suggestion, wouldn’t it be better if only the Query loop toggle could be created as a property? Actually, like this.
So in the properties section, the query loop will look like this. After activation, the Query control will be displayed. Just like creating a loop outside the component. In fact, the “query loop” property type adds a property as a toggle.
This makes the process of creating component properties much faster and simpler.
Yes, how about not providing a query property at all and allow us to use any component in a loop or not.
It is ridiculous to enforce having two exactly equal components just to be able to use one with a specific custom post type in a loop an recreate the exactly same component for the use with hardcoded data. And then you start to maintain both and keep them in sync. That‘s where you can drop components and just copy paste as before.
That’s a severe limitation of components that also harms the future of Bricks for Pro users.
Couldn’t agree more and this is why I’m not using components as I have the need to use them in and out of loops.
I raised an idea to make query loop an element in its own right and remove it from containers and blocks. This way you could attach the loop to anything by nesting it under the element you wanted to loop and you could reuse a query loop element by making it a component.
Absolutely, that would solve several disadvantages at once. This is my top priority feature request for Bricks. There‘s nothing else I am more interested in and which should definitely make it into a 2.0.