SOLVED: Query Loop First returned post item is not shown when editing

Bricks Version: 1.5.2
Browser: Firefox Developer
OS: macOS 12.6
URL: Sorry, on a localhost server

When creating and defining a Query Loop in the Bricks Edit view, the first element of the returned Query when I use “{variable_name}”, has only the variable name and then the first possible returned value is not included in the sample view inside the editor.

If I view the page with the Query Loop on the front end, the first possible post item is returned as expected.

Hi John,
Thanks so much for your report!

Showing the tag for the first post has always been the case and is not a bug. But, we are currently working on improving the preview and have introduced an experimental feature in Bricks 1.5.1:

This already works quite well in some scenarios, less so in others - which is why it is still an experimental feature we are continuously working on.

Best regards,
timmse

1 Like

I like having the first return as the variable name.

1 Like

Thanks Nora.

There are several ways to work this and different builders have provided variations on this functionality.

I can see reasons why this might be helpful and I am not specifically opposed to it.

If the development team can get to the ability of toggling this more reliably as they have said, I would want to see this as a toggle inside the editor and not externally.

Another approach that other builders use that I think is very useful is the first representation of the loop is expressed as variables and then the first actual record is represented in the rendering of the rest of the posts returned by loop. (But the first post returned is still rendered!)

Another approach I liked was the ability to turn the repeating off and show only one record to more easily style it, then toggle showing all records. (But still give me a choice to see variables or the first returned post please :P)

I actually, at the end of the day, would like to be able to toggle ALL variables used inside the editor to either show the variable or the data. We can do this now by rendering the page in another tab, not the “eye” preview though :P, but inside the editor feel like a better place to switch this as a toggle inside the editor.