CMS Development

SD_dev
Membro

Export to Template: Boolean - How to change the icon and the label

resolver

Hello, 

 

I've set an export to template boolean to allow some content to be toggled on/off on a page by page basis.

 

I am wondering how I can edit the icon used in the content editor - currently it's a "tick" which is quite confusing - as this shows even when it's toggled off.

 

Screenshot 2021-03-02 at 14.54.38.png

 

And how I can change the label used, currently it says "value", it would be easier for my client if this said "On" or something like this.

 

Screenshot 2021-03-02 at 14.54.47.png

 

I cannot see an example in the documentation about the boolean.

 

Current Code

{% boolean "form_toggle_bookcall" label='Show Book a Call Tab', value=True, export_to_template_context=true %}

 

Thank you

0 Avaliação positiva
1 Solução aceita
Jake_Lett
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Export to Template: Boolean - How to change the icon and the label

resolver

The icon and value is the default UI of the boolean tag. I would try creating a custom module that contains your boolean. This will give you the control you need. https://developers.hubspot.com/docs/cms/building-blocks/modules/configuration

Exibir solução no post original

3 Respostas 3
Jake_Lett
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Export to Template: Boolean - How to change the icon and the label

resolver

The icon and value is the default UI of the boolean tag. I would try creating a custom module that contains your boolean. This will give you the control you need. https://developers.hubspot.com/docs/cms/building-blocks/modules/configuration

alyssamwilie
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Export to Template: Boolean - How to change the icon and the label

resolver

@SD_dev You would need to make a clone of the module to be able to change the icon and labels. You can do this in the design manager by finding boolean.module in the @hubspot folder, right clicking, and selecting Clone Module.

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.
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Export to Template: Boolean - How to change the icon and the label

resolver

Hey @SD_dev !

Adding @Jake_Lett and @alyssamwilie to this for their insights 😺

0 Avaliação positiva