Issues with no_wrapper=True

I am trying to use no_wrapper=True to remove the default DIVS that are added to the header and single text modules.

I have done the following

Created a copy of the Header module and the single line of text module and added no_wrapper=True

Example:

{% text value="{{module.value}}" no_wrapper=True %}

But the wrapper still shows up.

I then tried to add no_wrapper=True to the module code in the HTML file but that caused the editable area to no longer be editable.

BTW. I am using a free sandbox. Don’t know if that is why its not working for me.

What am I doing wrong here? How can I get this work?

Hi @CBBentley

I just tried the same thing in my sandbox and it worked. Here is the code and result. It shouldn’t make any field noneditable.

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

Hi Gaurav. Thank you. That code did work. But I want to know why in the hubspot system it says to use the code in the screenshot to add the module to an HTML/Hubl template.

Hmmmm.. I looked up the tag you sent me. There are hubspot standard tags and hubspot modules. The text module is like the text tag.. I am so confused. When would one be used of the other?

Thank you for you help. I appriciate it.

Hi @CBBentley, to properly answer you “I want to know why in the hubspot system it says to use the code in the screenshot to add the module to an HTML/Hubl template” question, could I please ask you what’s your end goal? What are you trying to do?

Hi albertsg. I want to add a button module to a “not” drag and drop area. I also dont want it to have any added style/design tags. When I add the button using the supplied code from HubSpot and add “no_wrapper=True” the module is not editable.

{% module "module_17205595745931" path="@hubspot/button", label="button.module", no_wrapper=True %}

How can I get this module to display and be editable?

@CBBentley Adding the module just as you are showing should be enough, the key is the no_wrapper=True property.
I’ve just done a quick test with a custom module and works fine (not sure if it works with the default @hubspot modules).
Question, where in the template file are you adding the module? Can you share the template HTML with us?