CMS Development

KasieMarie
Participante

Problem adding module to html file

resolver

Hello community, 

 

I'm working on updating our blog template to add social sharing buttons. Because of our branding, I cannot use the hubspot developed module for social sharing and need to customize the icons. 

 

I put in the module snippet into the template code as seen below:

KasieMarie_0-1678900906713.png

The output that I get is:

KasieMarie_1-1678901033072.png

The problem is that I'm not seeing any of the social sharing buttons on the template where I put them (in live, or in preview).

KasieMarie_2-1678901258052.png

 

I do see the social sharing module in the blog editor. But, the issue is that I want to social sharing buttons as part of the blog template, not the blog post itself. 

*note: when I put in the snippet for the hubspot provided social sharing module, the code works fine.  

 

I've checked the path, I've manually entered the snippet, I've even re-cloned the social sharing module to ensure I didn't introduce a bug. 

 

Any help on this?

Best, 

Kasie

 

1 Soluciones aceptada
Anton
Solución
Líder intelectual | Partner
Líder intelectual | Partner

Problem adding module to html file

resolver

Hi @KasieMarie

 

first thing I'd try would be to right click on the custom sharing module, copy the snippet and paste it into the template. 

 

Also try to change the name of this module in the template so it becomes something different. So instead of 

{% module "module_NUMBERS" path="" label="" %}

try

{% module "custom_social_sharing" path="" label="" %}

or change any number in the current name.

 

Technical background: You can't have the same name twice in a template.

 

best, 

Anton

 

Anton Bujanowski Signature

Ver la solución en mensaje original publicado

3 Respuestas 3
co_space
Miembro

Problem adding module to html file

resolver

Did you ever find a solution? I'm dealing with a similar issue.

0 Me gusta
ankitparmar09
Colaborador líder

Problem adding module to html file

resolver

Problem adding module to html file

Hello @KasieMarie 

I can give you a module snipped, it can help you.

{% module "social_sharing" path="../modules/social-sharing", label="social-sharing" %}

 Thanks

Anton
Solución
Líder intelectual | Partner
Líder intelectual | Partner

Problem adding module to html file

resolver

Hi @KasieMarie

 

first thing I'd try would be to right click on the custom sharing module, copy the snippet and paste it into the template. 

 

Also try to change the name of this module in the template so it becomes something different. So instead of 

{% module "module_NUMBERS" path="" label="" %}

try

{% module "custom_social_sharing" path="" label="" %}

or change any number in the current name.

 

Technical background: You can't have the same name twice in a template.

 

best, 

Anton

 

Anton Bujanowski Signature