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

SD_dev
Member

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
3 Replies 3
dennisedson
Community Manager

Hey @SD_dev !

Adding @BootstrapC and @amwilie to this for their insights 😺

Thanks,

Dennis


We are excited to announce that the Community will be launching a weekly newsletter on November 2, 2020!
Sign up today!
0 Upvotes
amwilie
Key Advisor | Elite Partner

@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.

border

Alyssa Wilie

Web Developer at LyntonWeb

If this answer solved your question, please mark it as the solution!

BootstrapC
Top Contributor

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


Jacob Lett
HubSpot Marketing & Web Design Consultant
Creator of the Industrial Pro HubSpot Theme which helps manufacturers quickly build their website or blog on HubSpot.