# Problem while adding modules using snippets

**URL:** <https://community.hubspot.com/t/problem-while-adding-modules-using-snippets/17833>\
**Category:** CMS Development\
**Tags:** site-setup\
**Created:** [December 24, 2019, 11:34am UTC](https://community.hubspot.com/t/problem-while-adding-modules-using-snippets/17833 "2019-12-24T11:34:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tornike](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tornike/32/62178_2.png) [@Tornike](https://community.hubspot.com/u/Tornike)\
**Post date:** [December 24, 2019, 11:34am UTC](https://community.hubspot.com/t/problem-while-adding-modules-using-snippets/17833/1 "2019-12-24T11:34:00Z")

</div>

Hello everybody,

Need your help here…

One problem that I have is that I am trying to include html module in another html module (Not Drag&Drop) Hubspot says:

“This module can be added to any drag and drop template via the Add sidebar. It can be added to HTML/HubL templates using the following snippet” and gives me usage snippet…

When adding this thing errors happen:

-- Cannot resolve property “module”

-- ‘module’ is disabled in this context

What am I doing wrong?..

And one other question:

If I try to locate a module inside a module like this, how do I make so that when editing a template of this website, this module had an option of adding multiple module of this kind ?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [December 30, 2019, 1:47pm UTC](https://community.hubspot.com/t/problem-while-adding-modules-using-snippets/17833/2 "2019-12-30T13:47:48Z")

</div>

@Tornike

Could you provide us with any code that you’ve tried thus far?

---

<div class="post-metadata">

**Author:** ![DanielSanchez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danielsanchez/32/48193_2.png) [@DanielSanchez](https://community.hubspot.com/u/DanielSanchez)\
**Post date:** [December 31, 2019, 6:19pm UTC](https://community.hubspot.com/t/problem-while-adding-modules-using-snippets/17833/3 "2019-12-31T18:19:24Z")

</div>

Hi @Tornike ,

You has copy the snippet of module to paste in another? In your module, copy the snippet to paste where you need in your template. Look:

 ![templates (1).PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/8/e82fe192e60739670e5269c09a1a202b432cb440.png)

Did this post help solve your problem? If so, please mark it as a solution.

Best regards!

---

<div class="post-metadata">

**Author:** ![Tornike](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tornike/32/62178_2.png) [@Tornike](https://community.hubspot.com/u/Tornike)\
**Post date:** [January 8, 2020, 7:44am UTC](https://community.hubspot.com/t/problem-while-adding-modules-using-snippets/17833/4 "2020-01-08T07:44:22Z")

</div>

Thanks for response Daniel,

That’s what I am trying to do, copy that snippet which you indicated and then paste it in another module. It causes the error which I mentioned above.

I’m looking for ways to make this work and get rid of the error…

Any ideas?..

Oh and happy new year btw : )

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [January 8, 2020, 1:20pm UTC](https://community.hubspot.com/t/problem-while-adding-modules-using-snippets/17833/5 "2020-01-08T13:20:14Z")

</div>

Hey @Tornike

So it seems that even though the [official documentation](https://designers.hubspot.com/docs/hubl/hubl-supported-tags#custom-modules) says that using modules inside of other modules is a supported function, the error “‘module’ is **disabled** in this context” and [older community posts](https://community.hubspot.com/t5/CMS-Development/Error-quot-module-quot-is-disabled-in-this-context/td-p/201136) are showing that this is no longer the case.

So a potentially grueling solution would be to mimic the ‘child’ module’s authoring experience (data input), functionality, and markup/styling into the ‘parent’ module.

EDIT:

I said grueling but if structured correctly this could lead to a much more fluid and effecient authoring experience!

If the purpose of embedding modules in modules was to share a variable, I would take a look at [export\_to\_template\_context](https://designers.hubspot.com/docs/hubl/export-to-template-context) as this could be the parameter thats saves you a lot of time.

---

<div class="post-metadata">

**Author:** ![elanashama](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/elanashama/32/48165_2.png) [@elanashama](https://community.hubspot.com/u/elanashama)\
**Post date:** [June 7, 2022, 7:58am UTC](https://community.hubspot.com/t/problem-while-adding-modules-using-snippets/17833/6 "2022-06-07T07:58:56Z")

</div>

Can someone provide the code that works?
