templates/Tour/detail/tourTabbing.html.twig line 1

Open in your IDE?
  1. {% set items = [] %}
  2. {% if tour.gettingThere != '' %}
  3.     {% set items = items|merge([{
  4.         "id": "gettingThere-tab",
  5.         "text": "tour-detail.Anreise"|trans,
  6.         "href": "#gettingThere",
  7.         "isActive": true,
  8.         "targetId": "gettingThere",
  9.         "content": tour.gettingThere
  10.     }]) %}
  11. {% endif %}
  12. {% if tour.directions != '' %}
  13.     {% set items = items|merge([{
  14.         "id": "route-tab",
  15.         "text": "tour-detail.Wegbeschreibung"|trans,
  16.         "href": "#route",
  17.         "isActive": false,
  18.         "targetId": "route",
  19.         "content": tour.directions
  20.     }]) %}
  21. {% endif %}
  22. {% if tour.safetyGuidlines != '' %}
  23.     {% set items = items|merge([{
  24.         "id": "safety-tab",
  25.         "text": "tour-detail.Sicherheit & Ausrüstung"|trans,
  26.         "href": "#safety",
  27.         "isActive": false,
  28.         "targetId": "safety",
  29.         "content": tour.safetyGuidlines
  30.     }]) %}
  31. {% endif %}
  32. {% if tour.tip != '' %}
  33.     {% set items = items|merge([{
  34.         "id": "tips-tab",
  35.         "text": "tour-detail.Tipps"|trans,
  36.         "href": "#tips",
  37.         "isActive": false,
  38.         "targetId": "tips",
  39.         "content": tour.tip
  40.     }]) %}
  41. {% endif %}
  42. {% if tour.publicTransit != '' %}
  43.     {% set items = items|merge([{
  44.         "id": "public-transit-tab",
  45.         "text": "tour-detail.public-transit"|trans,
  46.         "href": "#public-transit",
  47.         "isActive": false,
  48.         "targetId": "public-transit",
  49.         "content": tour.publicTransit
  50.     }]) %}
  51. {% endif %}
  52. {% if tour.parking != '' %}
  53.     {% set items = items|merge([{
  54.         "id": "parking-tab",
  55.         "text": "tour-detail.Parken"|trans,
  56.         "href": "#parking",
  57.         "isActive": false,
  58.         "targetId": "parking",
  59.         "content": tour.parking
  60.     }]) %}
  61. {% endif %}
  62. {% if tour.additionalInformation != '' %}
  63.     {% set items = items|merge([{
  64.         "id": "additionalInformation-tab",
  65.         "text": "tour-detail.Weiteres"|trans,
  66.         "href": "#additionalInformation",
  67.         "isActive": false,
  68.         "targetId": "additionalInformation",
  69.         "content": tour.additionalInformation
  70.     }]) %}
  71. {% endif %}
  72. <section class="container container-sm content-block js-fade-in {{ anchorNavItem | default(null) ? 'js-anchor-nav__item' : '' }}">
  73.     {{ include('Includes/title-block.html.twig', {
  74.         title: 'tour-detail.Weitere Informationen'|trans,
  75.         isCentered: true
  76.     }) }}
  77.     {{ include('Includes/tabs.html.twig', _context) }}
  78.     <div class="tab-content" role="tabpanel">
  79.         {% for item in items %}
  80.             <div class="tab-pane fade {{ item.isActive ? 'show active' : '' }}" id="{{ item.targetId }}" aria-labelledby="{{ item.id }}">
  81.                 <section class="wysiwyg-area">
  82.                     <div class="container container-sm">
  83.                         <div class="wysiwyg-area__content wysiwyg">
  84.                             {{ item.content | raw }}
  85.                         </div>
  86.                     </div>
  87.                 </section>
  88.             </div>
  89.         {% endfor %}
  90.     </div>
  91. </section>