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 Solução aceita
Anton
Solução
Especialista reconhecido(a) | Parceiro Diamante
Especialista reconhecido(a) | Parceiro Diamante

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

Exibir solução no post original

3 Respostas 3
co_space
Membro

Problem adding module to html file

resolver

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

0 Avaliação positiva
ankitparmar09
Top colaborador(a)

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
Solução
Especialista reconhecido(a) | Parceiro Diamante
Especialista reconhecido(a) | Parceiro Diamante

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