Add subject in email address (when prob. occur in mailTo option)
https://prnt.sc/nkzsvq
{% set href = module.button.button_link.url.href %}
{% if module.button.button_link.url.type is equalto "EMAIL_ADDRESS" %}
{% if module.button.email_subject %}
{% set emailSubject = "?subject=" + module.button.email_subject %}
{% set href = "mailto:" + href + emailSubject %}
{% else %}
{% set href = "mailto:" + href %}
{% endif %}
{% endif %}
<a class="button white orange" href="{{ href }}"
{% if module.button.button_link.open_in_new_tab %}target="_blank"{% endif %}
{% if module.button.button_link.no_follow %}rel="nofollow"{% endif %}
>
{{ module.button.button_label }}
{% if module.button.button_link.url.type is equalto "EMAIL_ADDRESS" %}<i class="fa fa-envelope" aria-hidden="true"></i>{% endif %}
</a>
{% set href = module.button.button_link.url.href %}
{% if module.button.button_link.url.type is equalto "EMAIL_ADDRESS" %}
{% if module.button.email_subject %}
{% set emailSubject = "?subject=" + module.button.email_subject %}
{% set href = "mailto:" + href + emailSubject %}
{% else %}
{% set href = "mailto:" + href %}
{% endif %}
{% endif %}
<a class="button white orange" href="{{ href }}"
{% if module.button.button_link.open_in_new_tab %}target="_blank"{% endif %}
{% if module.button.button_link.no_follow %}rel="nofollow"{% endif %}
>
{{ module.button.button_label }}
{% if module.button.button_link.url.type is equalto "EMAIL_ADDRESS" %}<i class="fa fa-envelope" aria-hidden="true"></i>{% endif %}
</a>
Comments
Post a Comment