I have the following bit of code for a hero image in my template:
{% image "background_image" label='Select a background image', export_to_template_context=True %}
<style>
.hero { background-image:url("{{widget_data.background_image.src }}");
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
}
</style>
I’m wondering if there is a way to make the background image different based on a contact’s (company’s) Industry.
Is there a way to us HubL if statements for a company’s industry?
Basically something like:
If a company's industry is LOGISTICS,
<style>
.hero {
background: a custom image for logistics companies;
}
</style>
else
<style>
.hero {
background-image:url("{{widget_data.background_image.src }}");
</style>
Any help is greatly appreciated.
Thank you very much!