templates/location/detail.html.twig line 1

Open in your IDE?
  1. {% extends "layout/default.html.twig" %}
  2. {% block content %}
  3.     {{ jld_root(location, true, true) }}
  4.     {% set detailUrl = linkGenerator(location) %}
  5.     {% do elements_canonical(detailUrl, false) %}
  6.     {% do elements_opengraph().setUrl(detailUrl) %}
  7.     {% do elements_head_title(location.SeoTitle ?: location.name, true) %}
  8.     {% do elements_head_meta(location.SeoDescription ?: location.name, true) %}
  9.     {% do elements_opengraph().addImage(location.image()) %}
  10.     <main id="main-content" role="main" class="main-content content-block js-content-visibility">
  11.         <section class="location container content-block-small">
  12.             <div class="row gy-4">
  13.                 <div class="col-xl-6 col-lg-7 col-xxl-5 col-sm-12">
  14.                     {% if not editmode %}
  15.                         {% do breadcrumbHelper().add({
  16.                             'parentId': 0,
  17.                             'url': detailUrl,
  18.                             'label': location.name,
  19.                         }) %}
  20.                         {{ include('navigation/breadcrumb.html.twig') }}
  21.                     {% endif %}
  22.                     <a href="{{ siteConfig().getLocationOverview() }}" class="link-primary__left btn-back">
  23.                         <span class="icon icon-arrow icon-rotate-180"></span>
  24.                         {{ 'detail.backButton'|trans }}
  25.                     </a>
  26.                     {{ include('includes/resort-badge.html.twig', {
  27.                         resorts: location.resorts
  28.                     }) }}
  29.                     {{ include('includes/title-blocks/title-block-object.html.twig', {titleBold: location.name, titleStyle: 'h2', titleTag: 'h1'}) }}
  30.                     <address class="row gy-4 location__address mb-0">
  31.                         <div class="col-lg-7 col-md-6 col-sm-12 text-color-grey">
  32.                             <div class="font-bold ">{{ location.name }}</div>
  33.                             {% if location.street or location.zip or location.city %}
  34.                                 <div>
  35.                                     {% if location.street %}
  36.                                         {{ location.street }}<br/>
  37.                                     {% endif %}
  38.                                     {% if location.zip or location.city %}
  39.                                         {{ location.zip }} {{ location.city }} <br>
  40.                                     {% endif %}
  41.                                     {% if location.config()[0] is defined and location.config()[0].country %}
  42.                                         {{ elements_get_country_name(location.config()[0].country) }}
  43.                                     {% endif %}
  44.                                 </div>
  45.                             {% endif %}
  46.                         </div>
  47.                         {% if location.phone or location.fax or location.email %}
  48.                             <div class="col-lg-5 col-md-6 col-sm-12 font-bold location__address-links">
  49.                                 {% if location.phone %}
  50.                                     <a href="tel:{{ location.phone|phone }}" class="location__address-link link-with-icon text-secondary" title="phone">
  51.                                         <span class="contact icon icon-phone" aria-hidden="false"></span>
  52.                                         {{ location.phone }}
  53.                                     </a>
  54.                                 {% endif %}
  55.                                 {% if location.fax %}
  56.                                     <a href="tel:{{ location.fax|phone }}" class="location__address-link link-with-text text-secondary">
  57.                                     <span class="text">
  58.                                         {{ 'location.detail.fax'|trans }}
  59.                                     </span>
  60.                                         {{ location.fax }}
  61.                                     </a>
  62.                                 {% endif %}
  63.                                 {% if location.email %}
  64.                                     <a href="mailto:{{ location.email }}" class="location__address-link link-with-icon text-secondary" title="mail">
  65.                                         <span class="contact icon icon-mail" aria-hidden="false"></span>
  66.                                         {{ location.email }}
  67.                                     </a>
  68.                                 {% endif %}
  69.                             </div>
  70.                         {% endif %}
  71.                     </address>
  72.                     {% if location.openingTimes %}
  73.                     <div class="row mt-md-5 mt-4">
  74.                         <div class="col-xxl-8">
  75.                             <div class="font-bold mb-2">{{ 'location.detail.Öffnungszeiten'|trans }}</div>
  76.                             <div class="table-responsive wysiwyg">
  77.                                 {{ location.openingTimes|raw }}
  78.                             </div>
  79.                         </div>
  80.                     </div>
  81.                     {% endif %}
  82.                 </div>
  83.                 <div class="col-xl-6 col-lg-5 col-sm-12 col-xxl-5 offset-xxl-1 offset-xl-0 order-0 order-md-1">
  84.                     <div class="container__break-right-half-md">
  85.                         <div class="ratio ratio-3x2">
  86.                             {{ location.image.thumbnail("location-hero").getHtml({
  87.                                 imgAttributes: {
  88.                                     class: 'location-img ratio-item location__img',
  89.                                     loading: 'eager'
  90.                                 }
  91.                             })|raw }}
  92.                         </div>
  93.                     </div>
  94.                 </div>
  95.             </div>
  96.         </section>
  97.         {% set contacts = location.contacts %}
  98.         {% if contacts|length > 0 %}
  99.             <section class="contact-person-area container content-block-small">
  100.                 {{ include('includes/title-blocks/title-block-object.html.twig', {titleBold: 'location.detail.Anprechpersonen am Standort'|trans, titleStyle: 'h3'}) }}
  101.                 <div class="row gy-3">
  102.                     {% for contactPerson in contacts %}
  103.                         <div class="col-xxl-4 col-xl-6 col-md-6 col-sm-12">
  104.                             {{ include('includes/teaser/contact-person-teaser.html.twig', {
  105.                                 contactPerson: contactPerson
  106.                             }) }}
  107.                         </div>
  108.                     {% endfor %}
  109.                 </div>
  110.             </section>
  111.         {% endif %}
  112.         {{ include('includes/map-area.html.twig', {
  113.             title: "location.detail.Anfahrt zum Standort"|trans,
  114.             geoPoint: location.geo,
  115.             street: location.street,
  116.             zip: location.zip,
  117.             city: location.city,
  118.         }) }}
  119.     </main>
  120. {% endblock %}