I’ve noticed this question asked quite a lot and wanted to share a solution I’ve been using recently. I created a custom block to pass settings to columns within a layout field. For example, controlling Flexbox attributes (could be background colour, etc…):
I then check for this block in the frontend using $column->blocks()->hasType('flex'). It’s working well so far. If I don’t want content editors to see or use these blocks, I hide them using CSS, which isn’t ideal but does the job.
A very good approach! I previously solved this using a structure field in the layout, but I think this variant is actually better, I rebuild this in my new pagebuilder. Thanks for the tip, was a really good inspiration
Do you also use something like $column->blocks()->findBy('type', 'columnSettings'); to access the contents of the block?