Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Didier Marin 17 posts 89 karma points
    Jan 11, 2023 @ 12:09
    Didier Marin
    0

    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 ?

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jan 11, 2023 @ 12:30
    Huw Reddick
    0

    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.

  • Didier Marin 17 posts 89 karma points
    Jan 11, 2023 @ 12:36
    Didier Marin
    0

    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

  • Giu 23 posts 141 karma points
    Jan 12, 2023 @ 08:15
    Giu
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft