templates/Includes/areablock.html.twig line 1

Open in your IDE?
  1. {% set suffix = suffix | default('') %}
  2. {# if disallowed is extended also check gletscheWein and landingPage template as those override this parameter #}
  3. {% set defaultDisallowed = ['email*', 'newsletter*', 'landingpage*', 'teaser-list-bus-travel', 'teaser-list-young-styria-accommodation', 'teaser-list-young-styria-infrastructure', 'teaser-list-package', 'teaser-list-convention-partner', 'teaser-list-convention-incentive'] %}
  4. {% if document.property('allowBusTravelAreas') %}
  5.     {% set defaultDisallowed = ['email*', 'newsletter*', 'landingpage*', 'teaser-list-young-styria-accommodation', 'teaser-list-young-styria-infrastructure', 'teaser-list-package', 'teaser-list-convention-partner', 'teaser-list-convention-incentive'] %}
  6. {% elseif document.property('allowYoungStyriaAccommodationArea') %}
  7.     {% set defaultDisallowed = ['email*', 'newsletter*', 'landingpage*', 'teaser-list-bus-travel', 'teaser-list-young-styria-infrastructure', 'teaser-list-package', 'teaser-list-convention-partner', 'teaser-list-convention-incentive'] %}
  8. {% elseif document.property('allowYoungStyriaInfrastructureArea') %}
  9.     {% set defaultDisallowed = ['email*', 'newsletter*', 'landingpage*', 'teaser-list-bus-travel', 'teaser-list-young-styria-accommodation', 'teaser-list-package', 'teaser-list-convention-partner', 'teaser-list-convention-incentive'] %}
  10. {% elseif document.property('allowPackageArea') %}
  11.     {% set defaultDisallowed = ['email*', 'newsletter*', 'landingpage*', 'teaser-list-bus-travel', 'teaser-list-young-styria-accommodation', 'teaser-list-young-styria-infrastructure','teaser-list-convention-partner', 'teaser-list-convention-incentive'] %}
  12. {% elseif document.property('allowConventionPartnerArea') %}
  13.     {% set defaultDisallowed = ['email*', 'newsletter*', 'landingpage*', 'teaser-list-bus-travel', 'teaser-list-young-styria-accommodation', 'teaser-list-young-styria-infrastructure', 'teaser-list-package','teaser-list-convention-incentive'] %}
  14. {% elseif document.property('allowConventionIncentiveArea') %}
  15.     {% set defaultDisallowed = ['email*', 'newsletter*', 'landingpage*', 'teaser-list-bus-travel', 'teaser-list-young-styria-accommodation', 'teaser-list-young-styria-infrastructure', 'teaser-list-package', 'teaser-list-convention-partner'] %}
  16. {% endif %}
  17. {% set disallowed = disallowed | default(defaultDisallowed) %}
  18. {% set allowed = allowed | default({}) %}
  19. {% if document.property('standortPortal') and allowed is not empty %}
  20.     {% set allowed = allowed|merge(['media-video']) %}
  21. {% endif %}
  22. {% set areas = elements_areabrick(allowed, disallowed, true, [], areaParams | default([]), globalParams | default([])) %}
  23. {% set defaultAreaName = 'content' %}
  24. {% if areaName is defined and areaName is not empty %}
  25.     {% set defaultAreaName = areaName %}
  26. {% endif %}
  27. {% if params is defined and params is not empty %}
  28.     {% set areas = areas|merge(params) %}
  29. {% endif %}
  30. {% set limits = limits | default ({
  31.     'limits' : {
  32.         'media-gallery' : 2,
  33.         'content-timeline' : 1,
  34.         'content-download' : 1,
  35.         'content-text-slider' : 3,
  36.         'media-tile-gallery' : 1,
  37.         'media-video' : 1,
  38.         'teaser-img-slider' : 2,
  39.         'teaser-experience-slider' : 2,
  40.         'teaser-grid' : 1,
  41.         'teaser-tour-row' : 1,
  42.         'teaser-offer' : 3,
  43.         'teaser-top-offer' : 1,
  44.         'landingpage-inquiry' : 1,
  45.         'media-img-text-slide-rotating' : 3,
  46.         'teaser-list-bus-travel': 1,
  47.         'teaser-list-young-styria-accommodation': 1,
  48.         'teaser-list-young-styria-infrastructure': 1,
  49.         'teaser-list-package': 1,
  50.         'teaser-list-convention-partner': 1,
  51.         'teaser-list-convention-incentive': 1,
  52.         'demi-infrastructure-list': 1
  53.     }
  54. }) %}
  55. {% set areas = areas | merge(limits)%}
  56. {{ pimcore_areablock( defaultAreaName ~ suffix, areas ) }}