dnd_sections

How can i prevent the User from editing the section preferences like Background, padding and so on? I know how to set the defaults but can i lock them too? --> in custom dnd_sections

Hi @Hutfuchs,

to my knowledge you can’t prevent this since it’s a core function of dnd_sections.

But this doesn’t mean there’s no solution for this case.

A few ways you can create a workaround:

  • create “full-width” custom modules. This is something that dates back to the “pre-theme” days of HubSpot development and still is a quite common technique. The main idea is to create custom modules, that will have the functionality of a whole row but only with the settings you like to provide. It also can be a better solution than the dnd_sections since you can add quite a lot more functionality to modules than sections. The big drawback of this is, that you don’t have dnd functionality inside a module. This means that such a module can get quite an effort to develop(depending on your requirements) but to be honest: nothing that can’t be done with some boolean/choice fields :grinning_face_with_smiling_eyes:
  • create a custom CSS file. Add your desired styling to some classes and load this CSS file after {{ standard_header_includes }} of your theme (this line is most likely inside the base.html or similar). Once done, create some reusable sections templates and add those classes to the template(s).

best,

Anton

Hi @Hutfuchs

You can lock those settings. Instead, you can create a new section within that specific module ( like a full-width container ) and give your styles to that section, and by using content prevention settings, you can lock the fields to prevent the user from making changes.

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!

You can’t. just one more stupid implementation and feature added to “improve” the platform by the genius product team.

Good luck trying to optimize the 2.5+ megabyte imagery the content editors add with zero recourse for development interoperability without getting super hacky. Condolences to your performance.

Gradient banding, lack of smoothing, misaligned content that’s non-responsive from overly simplistic box model editing, etc, etc. Lack of theme adherence, design system adherence, etc, etc.

Man, looking at all of your responses over the years, it seems like you still don’t think that HubSpot is a good software…

You might wanna think about if this board is a right place to post constantly unhelpful and almost troll-like comments.

p.s: Flagged it as Inappropriate Content

Nonetheless - happy friday