Created
August 13, 2020 19:22
-
-
Save gjhead/106e8c8faee46caadf1ad2936d452758 to your computer and use it in GitHub Desktop.
You obviously need to make sure your fields match up - but this will take an address and turn it into a link to a google map.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ entry.eventLocation.streetAddress1 }}<br> | |
{% if entry.eventLocation.streetAddress2 | length %}{{ entry.eventLocation.streetAddress2 }}<br>{% endif %} | |
{% if entry.eventLocation.city %}{{ entry.eventLocation.city }}, {% endif %}{% if entry.eventLocation.state %}{{ entry.eventLocation.state }}{% endif %}{% if entry.eventLocation.zipCode %} {{ entry.eventLocation.zipCode}}{% endif %}</p> | |
<a class="link" href="https://www.google.com/maps/search/?api=1&query={{ entry.eventLocation.streetAddress1|escape('url')}}{% if entry.eventLocation.city %}%20{{ entry.eventLocation.city|escape('url') }}{% endif %}{% if entry.eventLocation.state %}%20%2C{{ entry.eventLocation.state|escape('url') }}{% endif %}{% if entry.eventLocation.zipCode %}%20{{ entry.eventLocation.zipCode|escape('url') }}{% endif %}" rel="nofollow" target="_blank">Get Directions</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment