templates/Community/detail.html.twig line 1

Open in your IDE?
  1. {# {{ pattern('organisms-convention-header') }} #}
  2. {% extends "Layout/default.html.twig" %}
  3. {% block content %}
  4.     {% set detailUrl = linkGenerator().generate(community) %}
  5.     {% do elements_canonical(detailUrl) %}
  6.     {% if community.property('seo_noindex') %}
  7.         {{ elements_robots().setNoIndex()|raw }}
  8.     {% endif %}
  9.     {% do elements_opengraph().setDescription(community.metaDescription ?: community.nameLocalized ?: community.name) %}
  10.     {% if community.teaserimage %}
  11.         {% do elements_opengraph().addImage(community.teaserimage) %}
  12.     {% endif %}
  13.     {% do elements_head_title().setTitle(community.metaTitle ?:community.nameLocalized ?: community.name, true) %}
  14.     {% do elements_head_meta().setDescription((community.metaDescription ?: community.shortDescription ?: community.description), true) %}
  15.     {% if not detailUrl is same as(app.request.pathInfo) %}
  16.         {% do elements_robots().setNoIndex(true) %}
  17.     {% endif %}
  18.     {% set alt = community.name ~ ' - Impression #1' %}
  19.     {% set teaserimage = community.teaserimage.image %}
  20.     {% for metadata in teaserimage.metadata %}
  21.         {% if metadata['name'] == 'alt' and metadata['language'] == 'de' %}
  22.             {% set alt = metadata['data'] %}
  23.         {% endif %}
  24.     {% endfor %}
  25.     {{ include('Includes/hero.html.twig', {
  26.         image: community.teaserimage,
  27.         alt: alt
  28.     }) }}
  29.     {% do pimcore_placeholder('addBreadcrumb').set({
  30.         'parentId' : document.getId(),
  31.         'url' : app.request.pathInfo,
  32.         'label' : community.nameLocalized ?: community.name
  33.     }) %}
  34.     {{ include('Navigation/breadcrumb.html.twig') }}
  35.     {{ include('Includes/main-title-block-with-contact.html.twig', {
  36.         title: community.name,
  37.         badges: [
  38.             {
  39.                 "title": community.parent is instanceof('\\Pimcore\\Model\\DataObject\\Region') ? community.parent.name : ('community.' ~ community.parent.key)|trans,
  40.             }],
  41.         subtitle: null,
  42.         wysiwyg: community.shortdescription,
  43.         styleModifier: 'content-block container container-sm title-block--move-up',
  44.         contactHasTabs:  community.parent is instanceof('\\Pimcore\\Model\\DataObject\\Region') and community.parent.contactObject,
  45.         useContactBoxVariables: true,
  46.         contactBoxName: community.contactName,
  47.         contactBoxImage: community.logo,
  48.         contactBoxStreet: community.street,
  49.         contactBoxZip: community.zip,
  50.         contactBoxCity: community.city,
  51.         contactBoxPhone: community.phone,
  52.         contactBoxFax: community.fax,
  53.         contactBoxEmail: community.email,
  54.         contactBoxWebsite: community.website starts with "http" ? community.website : ('https://' ~ community.website),
  55.         contactBox: community.parent is instanceof('\\Pimcore\\Model\\DataObject\\Region') ? community.parent.contactObject : null
  56.     }) }}
  57.     {{ include('Includes/wysiwyg-area.html.twig', {
  58.         title: 'community.wysiwyg area title'|trans,
  59.         subtitle: 'community.wysiwyg area subtitle'|trans,
  60.         isTitleCentered: true,
  61.         hasContactForm: false,
  62.         styleModifier: 'content-block js-fade-in',
  63.         content: community.description ~ community.additionalDescription,
  64.     }) }}
  65.     {{ include('Includes/gallery-area.html.twig', {
  66.         styleModifier: 'content-block js-fade-in',
  67.         title: 'community.gallery title'|trans,
  68.         subtitle: 'community.gallery subtitle'|trans,
  69.         wysiwyg: 'community.gallery wysiwyg'|trans,
  70.         styleModifier: 'content-block js-fade-in',
  71.         images: community.gallery,
  72.         headline: community.name
  73.     }) }}
  74.     {% if community.video1 %}
  75.         {{ include('Includes/video-area.html.twig', {
  76.             title: 'community.video area title'|trans,
  77.             subtitle: 'community.video area subtitle'|trans,
  78.             video: community.video1,
  79.         }) }}
  80.     {% endif %}
  81.     {% set videos = [] %}
  82.     {% if community.video2 %}
  83.         {% set videos = videos|merge([getVideoEditable(community.video2)]) %}
  84.     {% endif %}
  85.     {% if community.video3 %}
  86.         {% set videos = videos|merge([getVideoEditable(community.video3)]) %}
  87.     {% endif %}
  88.     {% if community.video4 %}
  89.         {% set videos = videos|merge([getVideoEditable(community.video4)]) %}
  90.     {% endif %}
  91.     {% if not videos is empty %}
  92.         {{ include('Includes/video-teaser-area.html.twig', {
  93.             title: 'community.video area row title'|trans,
  94.             subtitle: 'community.video area row subtitle'|trans,
  95.             wysiwyg: 'community.video area row wysiwyg'|trans,
  96.             videos: videos,
  97.         }) }}
  98.     {% endif %}
  99.     {% if community.geoposition %}
  100.         {{ include('Includes/teaser-grid.html.twig', {
  101.             title: 'community.Aktivitäten vor ort'|trans,
  102.             subtitle: 'community.Das können Sie hier erleben'|trans,
  103.             wysiwyg: null,
  104.             styleModifier: 'container content-block js-fade-in',
  105.             leftSideTwoTeasers: true,
  106.             items: {
  107.                 item1: {
  108.                     title: 'community.Touren' |trans,
  109.                     subtitle: 'community.subtitle' |trans,
  110.                     href: siteConfig.tourOverview ~ '?community=' ~ community.id,
  111.                     image: community.imageTeaserOverrideTour |default(siteConfig.teaserImageTour)
  112.                 },
  113.                 item2: {
  114.                     title: 'community.Excursion' |trans,
  115.                     subtitle: 'community.subtitle' |trans,
  116.                     href: siteConfig.infrastructureOverview ~ '?radiusType=excursion&community=' ~ community.id,
  117.                     image: community.imageTeaserOverrideExcursion |default(siteConfig.teaserImageExcursion)
  118.                 },
  119.                 item3: {
  120.                     title: 'community.Accomodation' |trans,
  121.                     href: siteConfig.accommodationOverview ~ '?nearbySearchId=' ~ community.id ~ '&nearbySearchLat=' ~ community.geoposition.latitude ~ '&nearbySearchLong=' ~ community.geoposition.longitude ~ '&sorting=nearbySearchAsc',
  122.                     image: community.imageTeaserOverrideAccomodation |default(siteConfig.teaserImageAccomodation)
  123.                 },
  124.                 item4: {
  125.                     title: 'community.Kulinarik' |trans,
  126.                     subtitle: 'community.subtitle' |trans,
  127.                     href: (siteConfig.culinaryOverview ?: siteConfig.infrastructureOverview) ~ '?predefinedHolidayTheme=8526&radiusType=culinary&community=' ~ community.id,
  128.                     image: community.imageTeaserOverrideKulinarik |default(siteConfig.teaserImageKulinarik)
  129.                 },
  130.                 item5: {
  131.                     title: 'community.Events' |trans,
  132.                     subtitle: 'community.subtitle' |trans,
  133.                     href: siteConfig.eventOverview ~ '?community=' ~ community.id,
  134.                     image: community.imageTeaserOverrideEvents |default(siteConfig.teaserImageEvents)
  135.                 }
  136.             }
  137.         }) }}
  138.     {% endif %}
  139.     {{ include('Includes/img-teaser-slider-area.html.twig', {
  140.         title: 'community.geheimtipps die sie wissen müssen'|trans,
  141.         subtitle: 'community.empfehlung der redaktion'|trans,
  142.         isCentered: true,
  143.         styleModifier: 'container content-block js-fade-in',
  144.         wysiwyg: null,
  145.         items: demiInfrastructure,
  146.     }) }}
  147.     {% if community.prognosis %}
  148.         {{ include('Includes/weather-slide.html.twig',{
  149.             styleModifier: 'content-block js-fade-in',
  150.             weatherStation: community.prognosis
  151.         }) }}
  152.     {% endif %}
  153.     {{ include('Includes/img-text-slide.html.twig', {
  154.         title: community.textSlideTitle |default(siteConfig.textSlideTitleDefault),
  155.         content: community.textSlideText |default(siteConfig.textSlideTextDefault),
  156.         image: community.textSlideImage |default(siteConfig.textSlideImageDefault),
  157.         link: community.textSlideLink |default(siteConfig.textSlideLinkDefault),
  158.         moveUp: false,
  159.         styleModifier: 'container container-md content-block',
  160.     }) }}
  161.     {{ include('Includes/simple-map.html.twig', {
  162.         title: 'community.map title'|trans,
  163.         subtitle: 'community.map subtitle'|trans,
  164.         street: community.street,
  165.         zip: community.zip,
  166.         city: community.city,
  167.         styleModifier: 'container content-block js-fade-in'
  168.     }) }}
  169.     {{ jld_root(community) }}
  170. {% endblock %}
  171.     {% block javascripts %}
  172.         {% if not app.request.get('onlyInlineCss') %}
  173.         {{ include('Layout/includes/encore.html.twig', {
  174.             'staticDebugMode': staticDebugMode,
  175.             'file': 'js/places'
  176.         }) }}
  177.         {% endif %}
  178.     {% endblock %}