CMS Development

dmsacco
参加者

Trying to Use a Boolean to Give the Option to hide a Button

解決

{% boolean "show_primary_cta_logo" label='Show Primary CTA?' value="true" no_wrapper=True, export_to_template_context=True %} {% if widget_data.show_primary_cta_logo.value == 'true' %}

  {{ widget.button_text }} 
 

{% endif %}

0 いいね!
1件の承認済みベストアンサー
benvanlooy
解決策
トップ投稿者 | Platinum Partner
トップ投稿者 | Platinum Partner

Trying to Use a Boolean to Give the Option to hide a Button

解決

Just to be sure, check out the Developer Info

 

and see if "widget_data.show_primary_cta_logo.value" is the right "path".. In the past this often has been my problem, that sometimes for some reason the path is different like it's not value but body.value.. So best check the Developer Info.

https://designers.hubspot.com/docs/hubl/how-to-use-developer-info-on-cos-pages

元の投稿で解決策を見る

0 いいね!
2件の返信
dmsacco
参加者

Trying to Use a Boolean to Give the Option to hide a Button

解決

I am not sure if I am missing something in my code, but the button isn't showing up on either toggle option.

0 いいね!
benvanlooy
解決策
トップ投稿者 | Platinum Partner
トップ投稿者 | Platinum Partner

Trying to Use a Boolean to Give the Option to hide a Button

解決

Just to be sure, check out the Developer Info

 

and see if "widget_data.show_primary_cta_logo.value" is the right "path".. In the past this often has been my problem, that sometimes for some reason the path is different like it's not value but body.value.. So best check the Developer Info.

https://designers.hubspot.com/docs/hubl/how-to-use-developer-info-on-cos-pages

0 いいね!