CMS Development

SD_dev
Member

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

SOLVE

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 Upvotes
1 Accepted solution
Jake_Lett
Solution
Guide | Partner
Guide | Partner

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

SOLVE

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

View solution in original post

3 Replies 3
Jake_Lett
Solution
Guide | Partner
Guide | Partner

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

SOLVE

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
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

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

SOLVE

@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
HubSpot Product Team
HubSpot Product Team

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

SOLVE

Hey @SD_dev !

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

0 Upvotes