CMS Development

zeshanshani
Member

Error:"module" is disabled in this context

I've created a global module and when I try to use it inside another module like this:

{% module "module_1533298233409297" module_id="3476458" label="EACD2018 - Social" %}

it always gives me the following error: 

 

Error:"module" is disabled in this context

 

I've searched a lot even tried to use the "export_to_template_context=True" parameter, but no luck. 

 

Thanks in advance for your help. 

10 Replies 10
elanashama
Top Contributor

Error:"module" is disabled in this context

this is crazy! what's the point of creating modules if you can't link to them frmo your template? 

Definitely need this option!

0 Upvotes
TFineas
Participant

Error:"module" is disabled in this context

Having the same problem here. I'm shocked this is something people have been requesting for this long and still doesn't exist. It's a little sad that the dev team is not sure if nesting in a modular system is a requirement. Just sad.

 

0 Upvotes
MSimpson4
Participant

Error:"module" is disabled in this context

Nesting/referencing modules is key to building modular, reusable code.  I'm still using the Design Manager for my projects.

Mohesh_Borah
Participant

Error:"module" is disabled in this context

Really, still this is not possible I guess.
As I am also facing the same issue.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Error:"module" is disabled in this context

Hey @Mohesh_Borah !  Actually, hello everyone.  I am curious to know how big of a deal this is now that we have partials and blocks available in local development.

 

0 Upvotes
fabianj
Contributor

Error:"module" is disabled in this context

Still not possible... so what is this moduel snippet thingy for anyway?!

0 Upvotes
fabianj
Contributor

Error:"module" is disabled in this context

I have the same issue! Just that it seems that I cannot even include local modules into other modules... G.

Very hard to build a modular system with current COS functionality... I have many other issues too btw.

0 Upvotes
rcarey
Member

Error:"module" is disabled in this context

This is a pretty large bummer.  It would definitely allow those of us who are designing more modern templates to design more accessible and editable code in complext layouts.

 

+1 vote to allow for nested modules

rcarey
Member

Error:"module" is disabled in this context

I would also add that a similar error occurs when trying to include partial templates in a global module.   Weird since this seems like EXACTLY the kind of thing you would want to do with a partial template.

lgerodiaz
Contributor

Error:"module" is disabled in this context

Interesting. I'm thinking that we couldn't really embed global modules as snippets for other modules as of this moment.