src/Elements/Bundle/DemiFrontendBundle/Resources/views/Infrastructure/detail/map.html.twig line 1

Open in your IDE?
  1. {#
  2. /**
  3.  * @var \Pimcore\Templating\PhpEngine view
  4.  * @var \Pimcore\Templating\GlobalVariables app
  5.  * #
  6.  */ #}
  7. {% if templateData['detailContact']['address'] is not empty %}
  8.     {% if infrastructure.getSystemIdentifier() is not same as "Graz" %}
  9.         {% set addressString = ((templateData['detailContact']['address'] | split("<br>"))| slice (-2, 2)) | join (" ") %}
  10.     {% else %}
  11.         {% set addressString = ((templateData['detailContact']['address'] | split("<br>")) | join (" ") | url_encode )  %}
  12.     {% endif %}
  13.     <iframe fetchpriority="low" frameborder="0" style="border:0"
  14.             src="https://www.google.com/maps/embed/v1/place?q={{ templateData['googlePlaceId'] ? "place_id:" ~ templateData['googlePlaceId'] : addressString }}&key={{ demi_getMapsKey() }}"
  15.             allowfullscreen></iframe>
  16. {% endif %}