templates/base.html.twig line 136

Open in your IDE?
  1. {# Global variables #}
  2. {# URL de la page newsletter (remplie si une page du sitemap utilise le template newsletter) #}
  3. {% set newsLetterSubscriptionPageUrl = '/inscription-newsletter' %}
  4. {% for mainPage in sulu_sitemap().children %}
  5. {% if mainPage.template is defined %}
  6. {% if mainPage.template == 'cruises_search_engine_temporary' %}
  7. {% set forGroupCruises = sulu_content_load(mainPage.uuid, {'forGroupCruises': 'forGroupCruises',}).content.forGroupCruises %}
  8. {% set pageContentPath = sulu_content_path(mainPage.url, mainPage.webspaceKey) %}
  9. {% elseif mainPage.template == 'cruise_details' %}
  10. {% set forGroupCruises = sulu_content_load(mainPage.uuid, {'forGroupCruises': 'forGroupCruises',}).content.forGroupCruises %}
  11. {% set pageContentPath = sulu_content_path(mainPage.url, mainPage.webspaceKey) %}
  12. {% if forGroupCruises == false %}
  13. {% set cruiseDetailsPageUrls = cruiseDetailsPageUrls|merge({'main': pageContentPath}) %}
  14. {% else %}
  15. {% set cruiseDetailsPageUrls = cruiseDetailsPageUrls|merge({'group': pageContentPath}) %}
  16. {% endif %}
  17. {% elseif mainPage.template == 'destination_list' %}
  18. {% for subPage in mainPage.children %}
  19. {% if subPage.template == 'destination_details' %}
  20. {% set destinationDetailsPageUrl = sulu_content_path(subPage.url, subPage.webspaceKey) %}
  21. {% endif %}
  22. {% endfor %}
  23. {% elseif mainPage.template == 'company_list' %}
  24. {% for subPage in mainPage.children %}
  25. {% if subPage.template == 'company_details' %}
  26. {% set companyDetailsPageUrl = sulu_content_path(subPage.url, subPage.webspaceKey) %}
  27. {% if subPage.children is defined %}
  28. {% for subSubPage in subPage.children %}
  29. {% if subSubPage.template == 'ship_details' %}
  30. {% set shipDetailsPageUrl = sulu_content_path(subSubPage.url, subSubPage.webspaceKey) %}
  31. {% endif %}
  32. {% endfor %}
  33. {% endif %}
  34. {% endif %}
  35. {% if subPage.template == 'company_terms_of_cancelation' %}
  36. {% set companyTermsOfCancelationPageUrl = sulu_content_path(subPage.url, subPage.webspaceKey) %}
  37. {% endif %}
  38. {% endfor %}
  39. {% elseif mainPage.template == 'customer_homepage' %}
  40. {% set customerHomepage = mainPage %}
  41. {% set customerHomepageUrl = sulu_content_path(mainPage.url, mainPage.webspaceKey) %}
  42. {% for child in mainPage.children %}
  43. {% if child.template == 'customer_complete_my_file' %}
  44. {% set customerCompleteMyFileUrl = sulu_content_path(child.url, mainPage.webspaceKey) %}
  45. {% endif %}
  46. {% endfor %}
  47. {% elseif mainPage.template == 'newsletter' %}
  48. {% set newsLetterSubscriptionPageUrl = sulu_content_path(mainPage.url, mainPage.webspaceKey) %}
  49. {% elseif mainPage.template == 'contact_us' %}
  50. {% set contactUsUrl = sulu_content_path(mainPage.url, mainPage.webspaceKey) %}
  51. {% endif %}
  52. {% endif %}
  53. {% endfor %}
  54. <!DOCTYPE html>
  55. <html lang="{{ app.request.locale|split('_')[0] }}">
  56. <head>
  57. <meta charset="utf-8">
  58. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  59. <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
  60. {% if app_serv_env !== 'prod' %}
  61. <link rel="icon" type="image/png" href="{{ asset('build/website/images/favicon-' ~ app_serv_env ~ '.png') }}">
  62. {% else %}
  63. <link rel="icon" type="image/png" href="{{ asset('build/website/images/favicon.png') }}">
  64. {% endif %}
  65. {% block meta %}
  66. {% include "@SuluWebsite/Extension/seo.html.twig" with {
  67. "seo": extension.seo|default([]),
  68. "content": content|default([]),
  69. "localizations": localizations|default([]),
  70. "shadowBaseLocale": shadowBaseLocale|default(),
  71. "defaultLocale": app.request.locale
  72. } %}
  73. {% endblock %}
  74. {% block stylesheets %}
  75. {{ encore_entry_link_tags('main') }}
  76. {# <link rel="stylesheet" href="{{ asset('build/website/main.css') }}"/>#}
  77. {% endblock %}
  78. {# CODE GOOGLE ANALYTICS - NE PAS TOUCHER | DONT TOUCH !!! #}
  79. <!-- Google tag (gtag.js)
  80. <script async src="https://www.googletagmanager.com/gtag/js?id=G-SBBYSYFGH9"></script>
  81. <script>
  82. window.dataLayer = window.dataLayer || [];
  83. function gtag(){dataLayer.push(arguments);}
  84. gtag('js', new Date());
  85. gtag('config', 'G-SBBYSYFGH9');
  86. </script> -->
  87. {# CODE GOOGLE ANALYTICS - NE PAS TOUCHER | DONT TOUCH !!! #}
  88. </head>
  89. <body
  90. class="{% block page_class %}{% endblock %}">
  91. {# Loader global pour le chargement des pages #}
  92. <div id="page-loader" class="page-loader">
  93. <div class="loader-content">
  94. <div class="loader"></div>
  95. <div class="loader-text">{{ 'common.loading'|trans }}</div>
  96. </div>
  97. </div>
  98. {% block header %}
  99. <header class="site-header site-header--desktop">
  100. {% block header_content %}
  101. {% include 'pages/_includes/base/_header.html.twig' with {'mode': 'desktop'} %}
  102. {% endblock %}
  103. <div class="site-header__below" data-site-header="search-slot">
  104. {% block header_search %}
  105. {% include 'pages/_includes/base/search_bar/_hero_section.html.twig' with {'mode': 'desktop'} %}
  106. {% endblock %}
  107. </div>
  108. {% block header_after %}{% endblock %}
  109. </header>
  110. <header class="site-header site-header--mobile">
  111. {% block header_content_mobile %}
  112. {% include 'pages/_includes/base/_header.html.twig' with {'mode': 'mobile'} %}
  113. {% endblock %}
  114. <div class="site-header__below" data-site-header="search-slot">
  115. {% block header_search_mobile %}
  116. {% include 'pages/_includes/base/search_bar/_hero_section.html.twig' with {'mode': 'mobile'} %}
  117. {% endblock %}
  118. </div>
  119. {% block header_after_mobile %}{% endblock %}
  120. </header>
  121. {% endblock %}
  122. {# <form action="{{ path('sulu_search.website_search') }}" method="GET">
  123. <input name="q" type="text" placeholder="Search"/>
  124. <input type="submit" value="Go"/>
  125. </form> #}
  126. {% block main %}
  127. <main>{% block content %}
  128. {% endblock %}
  129. </main>
  130. {% endblock %}
  131. <aside>{% block aside %}
  132. {% endblock %}
  133. </aside>
  134. {% block footer %}
  135. <footer class="footer"> {% block footer_before %}{% endblock %}
  136. {% block footer_content %}
  137. {% include 'pages/_includes/base/_footer.html.twig' %}
  138. {% endblock %}
  139. {% block footer_after %}{% endblock %}
  140. </footer>
  141. {% endblock %}
  142. {% block modals %}
  143. {# Modales d'authentification #}
  144. {% include 'pages/_includes/modals/_customer_login_modal.html.twig' %}
  145. {% include 'pages/_includes/modals/_forgot_password_modal.html.twig' %}
  146. {% include 'pages/_includes/modals/_subscription_modal.html.twig' %}
  147. {% include 'pages/_includes/partials/_popup_recall.html.twig' %}
  148. {% include 'pages/_includes/modals/_offer_detail_modal.html.twig' %}
  149. {% endblock %}
  150. {% block javascripts %}
  151. {# Chargement direct des fichiers JS compilés par Vite (modules ES6) #}
  152. {{ encore_entry_script_tags('main') }}
  153. {# {{ encore_entry_script_tags('custom-bootstrap') }} #}
  154. {% block javascripts_searchbar_main %}
  155. {# {{ encore_entry_script_tags('search-bar', null, 'croisiland-search') }} #}
  156. {% endblock %}
  157. {% endblock %}
  158. </body>
  159. </html>