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
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | 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 Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

2 Replies 2
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | 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 Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
jasonxpan
Participant

How to separate modules without duplicating it

SOLVE

Thank you! 

0 Upvotes