- Issue created by @vbouchet
- πΊπΈUnited States Chris Burge
@vbouchet As you mentioned, this feature request would require the module to be re-architected. Have you looked at the Layout Builder Styles β module?
- π«π·France vbouchet
Hi @Chris. I found out the module after I started to re-architecture. Even if Layout Builder Styles is more flexible, I still found it restrictive (but I have not deep dive in the code yet). I will share a github repo with the approach to initiate the conversation.
- π«π·France vbouchet
I initiated this Github repository: https://github.com/vbouchet31/layout_builder_attributes
While developing I realised that we can apply the same logic to section and region attributes, hence the module name is agnostic.
Adding the possibility to create a plugin via a UI (similar to what Layout Builder Custom Styles does) should theoretically handle all the possible cases.Most basic cases are for editors to enter directly arbitrary class, id, style or data-* (achieved with default plugins).
More advanced cases are for editors to pick human-friendly option from a predefined list which technically adds the class, id, style, data-* defined.
Very custom cases (like the possibility for editors to only apply something on a "basic block" in the left-column of a 2 columns layout or the classes to be calculated at the rendering time based on the context) can be achieved via custom plugins.