CMS Development

tel_mark
Participant

Create section header

I want to create a new custom module in a theme through the design manager that is a full width section header for a landing page...

 

tel_mark_0-1618393310422.png

Currently, we are creating these manually from a standard section header, styling it and then cloning it but it's not efficient.

So, I've created a custom module which uses a rich text edit field...

tel_mark_1-1618393560848.png

...but I want to set the rte field to 100% width and either style the rte field with a background color or style the section itself. However, the section is a parent of the custom module so I don't know whether I can style it. What's my best option?

0 Upvotes
4 Replies 4
webdew
Guide | Diamond Partner
Guide | Diamond Partner

Create section header

Hi @tel_mark ,

You don't have to create a new module. 
created a video for you, follow the steps shown:
https://www.loom.com/share/625f64fdb7034333bd527f3af3042a66

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.


John
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Create section header

@tel_mark,


How do you plan on getting a module to always be full width in a drag and drop editor when content creators could put it in a row with multiple columns? I think you should just make a section header module with the styles that work in this context, and styles that don't translate to a drag and drop editor you should leave to the content editor.

Otherwise, you could make a "row module" that works around a theme's content container/layout, but that involves css sorcery



I like kudos almost as much as cake – a close second.

tel_mark
Participant

Create section header

Thanks John - I sort of solved it with some CSS and JQuery to select the closest row and then style that. However, the results were too unpredictable.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Create section header

Hey @tel_mark 

Maybe post an example link?  Might be easier to visualize this

@piersg might have some advice.

Heck, he always has advice. 

0 Upvotes