# no\_wrapper Hubl Variables for Custom Page Module

**URL:** <https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336>\
**Category:** CMS Development\
**Created:** [September 21, 2018, 3:39pm UTC](https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336 "2018-09-21T15:39:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcusZeal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marcuszeal/32/65764_2.png) [@MarcusZeal](https://community.hubspot.com/u/MarcusZeal)\
**Post date:** [September 21, 2018, 3:39pm UTC](https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336/1 "2018-09-21T15:39:55Z")

</div>

I’m trying to create a module where all the html/wrapping I need is done directly in the module itself.

How would I go about using the no\_wrapper HUBL parameter to remove the wrap from a custom page module?

---

<div class="post-metadata">

**Author:** ![MarcusZeal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marcuszeal/32/65764_2.png) [@MarcusZeal](https://community.hubspot.com/u/MarcusZeal)\
**Post date:** [September 21, 2018, 4:17pm UTC](https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336/2 "2018-09-21T16:17:15Z")

</div>

This is my temporary solution:

$(‘.resource-card’).unwrap();

It’s not ideal, but it’s functional. 😕

---

<div class="post-metadata">

**Author:** ![Jsum](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jsum/32/20405_2.png) [@Jsum](https://community.hubspot.com/u/Jsum)\
**Post date:** [September 21, 2018, 4:36pm UTC](https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336/3 "2018-09-21T16:36:41Z")

</div>

@MarcusZeal, I don’t think you can, but you can add a custom class to the module itself which would apply to the outer wrapper. You can also wrap the module in code from the module settings in a drag and drop template.

You can apply ‘no\_wrapper=True’ to modules in code form. I don’t know if this works for custom modules, or how you would apply a code snippet to a template now that the custom html and custom hubl modules were removed. This only removes the span tag beween the module code and the outer div, and I not sure if this even works on custom modules now to begin with.

Why are you needing to remove the wrapper? If it is because you are trying to allow some script to target the inner html of the wrapper, say for a slider, then your off base. The new custom module tools have repeater fields. You should be building your entire module in one peice so that you have control over all of the markup.

Need help? [Hire Us Here](https://www.upwork.com/o/companies/_~0124e15ff34efb3871/)

---

<div class="post-metadata">

**Author:** ![amcintosh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amcintosh/32/32338_2.png) [@amcintosh](https://community.hubspot.com/u/amcintosh)\
**Post date:** [September 21, 2018, 7:31pm UTC](https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336/4 "2018-09-21T19:31:06Z")

</div>

Mostly replying because I’m interested in following this conversation.

Although I’m sure this is a terrible bastardization of what HubSpot intended, you can still add valid HUBBL code into the “Wrapping HMTL” of a module and accomplish some of the same things.

As a quick test, I put the {{ html }} section in a {% raw %} tag so I could see the id, and tried referencing it using {% module module\_id=# %} instead of {{ html }} no\_wrapper=true. Unfortunatley didn’t work. On the plus side, the other kinds of modules I tried no\_wrapper on _did_ work. So, if that helps you hack your module into doing what it needs to do, neat :-]

 ![Image%202018-09-21%20at%2012.24.26%20PM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/b/1bb056f08e03e53c48f8d153f906416e50e559b8.jpeg)

---

<div class="post-metadata">

**Author:** ![MarcusZeal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marcuszeal/32/65764_2.png) [@MarcusZeal](https://community.hubspot.com/u/MarcusZeal)\
**Post date:** [September 21, 2018, 7:37pm UTC](https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336/5 "2018-09-21T19:37:36Z")

</div>

The repeater field would be functional, I believe, for what I’m trying to do. My goal is to make an Isotope-powered listing of sorts for different items. The items would be posted via the module itself.

The module needs to be able to have booleans to target / give the div specific classes for sorting functionality, some basic image URLs options and some text. 🙂

The solution I have now, I believe, should work for this iteration of the launch pad site. The script is firing very quickly and isn’t breaking other things so I’m pretty happy with it. v2 will probably utilize a repeater module as you suggested though. 🙂

Thanks for the replies!

---

<div class="post-metadata">

**Author:** ![MarcusZeal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marcuszeal/32/65764_2.png) [@MarcusZeal](https://community.hubspot.com/u/MarcusZeal)\
**Post date:** [October 6, 2021, 12:39pm UTC](https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336/6 "2021-10-06T12:39:43Z")

</div>

A quick update on this since the way I do this today is very different from using javascript to strip the DOM. Looking back, it’s a little funny just _how_ close I was in my original question here.

no\_wrapper=true is supported in most custom modules. When I build a module no, adding “no\_wrapper=true” before the closing %} is almost second nature. I use this in every Rich Text and Text.

When creating a grid-like the one I was doing in 2018, I would start with what would go into a single instance of that repeatable area. (Name, Title, Bio, Profile Image). This was a Team Members module if you couldn’t guess haha.

Then I would group the modules in the module builder and set that group to be repeatable. Now that the hubl variables are set, I’d copy the snippet to the HTML part of the module and move them around as needed.

I’d add no\_wrapper=true to the Name (text), Title (text), and Bio (Rich text). I do this because I want my DOM to be \<h3 class=“job-title”\>Job Title Goes Here\</h3\> and not \<h3 class=“job-title”\>\<div id=“moduleid”\>Job Title Goes Here\</div\>\</h3\>

And then add some flex CSS rules to get it into a grid.

Hope this helps someone!

TLDR:

```lia-code-sample
... no_wrapper=True %}

```

---

<div class="post-metadata">

**Author:** ![elton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/elton/32/32521_2.png) [@elton](https://community.hubspot.com/u/elton)\
**Post date:** [September 9, 2022, 6:20am UTC](https://community.hubspot.com/t/no-wrapper-hubl-variables-for-custom-page-module/10336/7 "2022-09-09T06:20:46Z")

</div>

@MarcusZeal Thanks, this helped
