CMS Development

SD_dev
メンバー

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

解決

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 いいね!
1件の承認済みベストアンサー
Jake_Lett
解決策
ガイド役 | Solutions Partner
ガイド役 | Solutions Partner

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

解決

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

元の投稿で解決策を見る

3件の返信
Jake_Lett
解決策
ガイド役 | Solutions Partner
ガイド役 | Solutions Partner

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

解決

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
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

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

解決

@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製品開発チーム
HubSpot製品開発チーム

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

解決

Hey @SD_dev !

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

0 いいね!