The columns are a HubL, and I am using a widget to create different color choices. My problem is, only the 2 first colors actually work (my if and first "else if" will work as expected. The rest won't...). I am not sure what I am doing wrong...
It looks like you are using a choice field to give your users some color options: Yellow, Orange, Blue, and Green.
Each option you set in the module choice field has two attributes, label and value. The value is what you check against, the label is the text that is show in the drop down. You should check the values in your choice field to ensure that they are lowercase and otherwise formatted correctly.
anotherthing you can do, to remove the if statements, is use the hexidecimal color codes as the values for the choice field options:
a Hubspot custom module choice field with color options
Then you can output the color code directly into the html:
For using any Personalization Token in if/else condition, it is necessary to enable programmable email. And for that, you need to add isEnabledForEmailV3Rendering: trueat the top of the template. For reference, please check the screenshot. For more, please go to this page.
For using any Personalization Token in if/else condition, it is necessary to enable programmable email. And for that, you need to add isEnabledForEmailV3Rendering: trueat the top of the template. For reference, please check the screenshot. For more, please go to this page.
It looks like you are using a choice field to give your users some color options: Yellow, Orange, Blue, and Green.
Each option you set in the module choice field has two attributes, label and value. The value is what you check against, the label is the text that is show in the drop down. You should check the values in your choice field to ensure that they are lowercase and otherwise formatted correctly.
anotherthing you can do, to remove the if statements, is use the hexidecimal color codes as the values for the choice field options:
a Hubspot custom module choice field with color options
Then you can output the color code directly into the html: