Hi
I'm using the Block grid editor in umbraco v11.
It's possible to apply a setting model on the "row", but is it possible to add settings on an area.
For example, I've define a layout with 3 areas (4-4-4), and I'd like to be able to put a background color on an individual cell.
I can do it on the differennt elements I can add in an area (RTE, ...), but not on the area itself.
Is it possible and if yes how can I do it ?
I don't think that is possible, but you could define a row level setting that has 3 background colour properties, one for each area. You would then need to adjust/create your own areas template to pick the correct background colour.
Thanks for the answer, but Iit will be painfull to create such settings for all layouts, as I have different layouts (1, 2, 3 or 4 columns)
For the layout with 1 column it's easy as it's the setting model, but not for the layouts with more than 1 area
Editing the native control to add "cell styles" will be a pain, because it looks like it is not native, so there's a risk that, for the next version upgrade all the code that is added becomes irrelevant. Also the data in database might no longer follow the same data structure so it opens a can of worms.
I think we could have a chance with some js, some "interceptors" and overriding the Property Value Converters for that control, but it is really really tricky given the reason above.
If it's a strict requirement, my best attempt would be to create a "custom block grid" editor by taking inspiration from the original component, amend the control to select cells and allow styles at the cell level, save the data in the database as json and render the data using a property value converter.
For most clients I would try to convince them to go with another editor / strategy as it would be easier/cheaper, but there's a way.
Block grid umbraco 11
Hi I'm using the Block grid editor in umbraco v11. It's possible to apply a setting model on the "row", but is it possible to add settings on an area. For example, I've define a layout with 3 areas (4-4-4), and I'd like to be able to put a background color on an individual cell. I can do it on the differennt elements I can add in an area (RTE, ...), but not on the area itself. Is it possible and if yes how can I do it ?
I don't think that is possible, but you could define a row level setting that has 3 background colour properties, one for each area. You would then need to adjust/create your own areas template to pick the correct background colour.
Thanks for the answer, but Iit will be painfull to create such settings for all layouts, as I have different layouts (1, 2, 3 or 4 columns) For the layout with 1 column it's easy as it's the setting model, but not for the layouts with more than 1 area
Editing the native control to add "cell styles" will be a pain, because it looks like it is not native, so there's a risk that, for the next version upgrade all the code that is added becomes irrelevant. Also the data in database might no longer follow the same data structure so it opens a can of worms.
I think we could have a chance with some js, some "interceptors" and overriding the Property Value Converters for that control, but it is really really tricky given the reason above.
If it's a strict requirement, my best attempt would be to create a "custom block grid" editor by taking inspiration from the original component, amend the control to select cells and allow styles at the cell level, save the data in the database as json and render the data using a property value converter.
For most clients I would try to convince them to go with another editor / strategy as it would be easier/cheaper, but there's a way.
is working on a reply...