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>

Comments

Popular posts from this blog

Pagination of multiple recent post blog

Service Filter

When You Want to open popup(first time load)