Blog, Website & Page Publishing

jasonxpan
Participant

How to separate modules without duplicating it

SOLVE

I'm using a default hubspot image module in one of my hubl+html email templates and using the snippet like this:

 

 

{% module "module_167459140015211" path="@hubspot/linked_image", label="Image" class="mcnImage" %}

 

 

 

The problem I have is that if I use the same image module in the email template it mimics the original. Is it possible to make it separate without having to clone the module? Ideally don't want like 10 image modules.

duplicate.jpg

0 Upvotes
1 Accepted solution
amwilie
Solution
Key Advisor | Elite Partner
Key Advisor | Elite Partner

How to separate modules without duplicating it

SOLVE

The "module_167459140015211" in the tag is a unique identifier for the placed module, if two {% module %} tags have the same identifier they're treated as though they're the same module. So all you need to do is give the two tags different identifiers. This identifier can be anything you want as long as it uses underscores instead of spaces or dashes. Example:

 

{% module "email_image_one" path="@hubspot/linked_image", label="Image" class="mcnImage" %}

{% module "email_image_two" path="@hubspot/linked_image", label="Image" class="mcnImage" %}

 

If this answer solved your question, please mark it as the solution!

Alyssa Wilie

Web Developer at Lynton

explore hubspot themes from lynton

Need custom website/integration development or help optimizing HubSpot for your organization?
Schedule a consultation with us, an award-winning HubSpot Elite Partner.


Or check out our blog to get the latest in marketing, design, integration, and HubSpot knowledge.

 

View solution in original post

2 Replies 2
amwilie
Solution
Key Advisor | Elite Partner
Key Advisor | Elite Partner

How to separate modules without duplicating it

SOLVE

The "module_167459140015211" in the tag is a unique identifier for the placed module, if two {% module %} tags have the same identifier they're treated as though they're the same module. So all you need to do is give the two tags different identifiers. This identifier can be anything you want as long as it uses underscores instead of spaces or dashes. Example:

 

{% module "email_image_one" path="@hubspot/linked_image", label="Image" class="mcnImage" %}

{% module "email_image_two" path="@hubspot/linked_image", label="Image" class="mcnImage" %}

 

If this answer solved your question, please mark it as the solution!

Alyssa Wilie

Web Developer at Lynton

explore hubspot themes from lynton

Need custom website/integration development or help optimizing HubSpot for your organization?
Schedule a consultation with us, an award-winning HubSpot Elite Partner.


Or check out our blog to get the latest in marketing, design, integration, and HubSpot knowledge.

 

jasonxpan
Participant

How to separate modules without duplicating it

SOLVE

Thank you! 

0 Upvotes