custom/plugins/TcinnThemeWareStrong/src/Resources/views/storefront/layout/footer/footer.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/footer/footer.html.twig' %}
  2. {# TODO: prüfen... #}
  3. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  4. {# ThemeWare: Set theme variables #}
  5. {% set twtFooterElement1 = theme_config('twt-footer-element-1') %}
  6. {% set twtFooterBottomElement1 = theme_config('twt-footer-bottom-element-1') %}
  7. {% set twtFooterElement10 = theme_config('twt-footer-element-10') %}
  8. {% set twtFooterElement11 = theme_config('twt-footer-element-11') %}
  9. {% set twtFooterElement2 = theme_config('twt-footer-element-2') %}
  10. {% set twtFooterElement3 = theme_config('twt-footer-element-3') %}
  11. {% set twtFooterElement4 = theme_config('twt-footer-element-4') %}
  12. {% set twtFooterElement5 = theme_config('twt-footer-element-5') %}
  13. {% set twtFooterElement6 = theme_config('twt-footer-element-6') %}
  14. {% set twtFooterElement7 = theme_config('twt-footer-element-7') %}
  15. {% set twtFooterElement8 = theme_config('twt-footer-element-8') %}
  16. {% set twtFooterElement9 = theme_config('twt-footer-element-9') %}
  17. {% set twtFooterGridColumns = theme_config('twt-footer-grid-columns') %}
  18. {% set twtFooterGridColumnsTablet = theme_config('twt-footer-grid-columns-tablet') %}
  19. {% set twtFooterLogosCompatibility = theme_config('twt-footer-logos-compatibility') %}
  20. {% set twtFooterLogosShow = theme_config('twt-footer-logos-show') %}
  21. {% set twtFooterTypeCompatibility = theme_config('twt-footer-type-compatibility') %}
  22. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  23. {# ThemeWare: Adjustments on the footer navigation #}
  24. {% block layout_footer_navigation %}
  25.     {# ThemeWare: Create Footer-Elements #}
  26.     {% set twtFooterElements = {} %}
  27.     {# ThemeWare: Footer-Element 1 #}
  28.     {% if twtFooterElement1 != 'none' %}
  29.         {% set twtFooterElements = twtFooterElements|merge({
  30.             1: {
  31.                 elementid:1,
  32.                 element:theme_config('twt-footer-element-1'),
  33.                 toggle:theme_config('twt-footer-element-1-toggle'),
  34.                 newcol:theme_config('twt-footer-element-1-newcol'),
  35.                 position:theme_config('twt-footer-element-1-position'),
  36.                 order:theme_config('twt-footer-element-1-order')
  37.             }
  38.         }) %}
  39.     {% endif %}
  40.     {# ThemeWare: Footer-Element 2 #}
  41.     {% if twtFooterElement2 != 'none' %}
  42.         {% set twtFooterElements = twtFooterElements|merge({
  43.             2: {
  44.                 elementid:2,
  45.                 element:theme_config('twt-footer-element-2'),
  46.                 toggle:theme_config('twt-footer-element-2-toggle'),
  47.                 newcol:theme_config('twt-footer-element-2-newcol'),
  48.                 position:theme_config('twt-footer-element-2-position'),
  49.                 order:theme_config('twt-footer-element-2-order')
  50.             }
  51.         }) %}
  52.     {% endif %}
  53.     {# ThemeWare: Footer-Element 3 #}
  54.     {% if twtFooterElement3 != 'none' %}
  55.         {% set twtFooterElements = twtFooterElements|merge({
  56.             3: {
  57.                 elementid:3,
  58.                 element:theme_config('twt-footer-element-3'),
  59.                 toggle:theme_config('twt-footer-element-3-toggle'),
  60.                 newcol:theme_config('twt-footer-element-3-newcol'),
  61.                 position:theme_config('twt-footer-element-3-position'),
  62.                 order:theme_config('twt-footer-element-3-order')
  63.             }
  64.         }) %}
  65.     {% endif %}
  66.     {# ThemeWare: Footer-Element 4 #}
  67.     {% if twtFooterElement4 != 'none' %}
  68.         {% set twtFooterElements = twtFooterElements|merge({
  69.             4: {
  70.                 elementid:4,
  71.                 element:theme_config('twt-footer-element-4'),
  72.                 toggle:theme_config('twt-footer-element-4-toggle'),
  73.                 newcol:theme_config('twt-footer-element-4-newcol'),
  74.                 position:theme_config('twt-footer-element-4-position'),
  75.                 order:theme_config('twt-footer-element-4-order')
  76.             }
  77.         }) %}
  78.     {% endif %}
  79.     {# ThemeWare: Footer-Element 5 #}
  80.     {% if twtFooterElement5 != 'none' %}
  81.         {% set twtFooterElements = twtFooterElements|merge({
  82.             5: {
  83.                 elementid:5,
  84.                 element:theme_config('twt-footer-element-5'),
  85.                 toggle:theme_config('twt-footer-element-5-toggle'),
  86.                 newcol:theme_config('twt-footer-element-5-newcol'),
  87.                 position:theme_config('twt-footer-element-5-position'),
  88.                 order:theme_config('twt-footer-element-5-order')
  89.             }
  90.         }) %}
  91.     {% endif %}
  92.     {# ThemeWare: Footer-Element 6 #}
  93.     {% if twtFooterElement6 != 'none' %}
  94.         {% set twtFooterElements = twtFooterElements|merge({
  95.             6: {
  96.                 elementid:6,
  97.                 element:theme_config('twt-footer-element-6'),
  98.                 toggle:theme_config('twt-footer-element-6-toggle'),
  99.                 newcol:theme_config('twt-footer-element-6-newcol'),
  100.                 position:theme_config('twt-footer-element-6-position'),
  101.                 order:theme_config('twt-footer-element-6-order')
  102.             }
  103.         }) %}
  104.     {% endif %}
  105.     {# ThemeWare: Footer-Element 7 #}
  106.     {% if twtFooterElement7 != 'none' %}
  107.         {% set twtFooterElements = twtFooterElements|merge({
  108.             7: {
  109.                 elementid:7,
  110.                 element:theme_config('twt-footer-element-7'),
  111.                 toggle:theme_config('twt-footer-element-7-toggle'),
  112.                 newcol:theme_config('twt-footer-element-7-newcol'),
  113.                 position:theme_config('twt-footer-element-7-position'),
  114.                 order:theme_config('twt-footer-element-7-order')
  115.             }
  116.         }) %}
  117.     {% endif %}
  118.     {# ThemeWare: Footer-Element 8 #}
  119.     {% if twtFooterElement8 != 'none' %}
  120.         {% set twtFooterElements = twtFooterElements|merge({
  121.             8: {
  122.                 elementid:8,
  123.                 element:theme_config('twt-footer-element-8'),
  124.                 toggle:theme_config('twt-footer-element-8-toggle'),
  125.                 newcol:theme_config('twt-footer-element-8-newcol'),
  126.                 position:theme_config('twt-footer-element-8-position'),
  127.                 order:theme_config('twt-footer-element-8-order')
  128.             }
  129.         }) %}
  130.     {% endif %}
  131.     {# ThemeWare: Footer-Element 9 #}
  132.     {% if twtFooterElement9 != 'none' %}
  133.         {% set twtFooterElements = twtFooterElements|merge({
  134.             9: {
  135.                 elementid:9,
  136.                 element:theme_config('twt-footer-element-9'),
  137.                 toggle:theme_config('twt-footer-element-9-toggle'),
  138.                 newcol:theme_config('twt-footer-element-9-newcol'),
  139.                 position:theme_config('twt-footer-element-9-position'),
  140.                 order:theme_config('twt-footer-element-9-order')
  141.             }
  142.         }) %}
  143.     {% endif %}
  144.     {# ThemeWare: Footer-Element 10 #}
  145.     {% if twtFooterElement10 != 'none' %}
  146.         {% set twtFooterElements = twtFooterElements|merge({
  147.             10: {
  148.                 elementid:10,
  149.                 element:theme_config('twt-footer-element-10'),
  150.                 toggle:theme_config('twt-footer-element-10-toggle'),
  151.                 newcol:theme_config('twt-footer-element-10-newcol'),
  152.                 position:theme_config('twt-footer-element-10-position'),
  153.                 order:theme_config('twt-footer-element-10-order')
  154.             }
  155.         }) %}
  156.     {% endif %}
  157.     {# ThemeWare: Footer-Element 11 #}
  158.     {% if twtFooterElement11 != 'none' %}
  159.         {% set twtFooterElements = twtFooterElements|merge({
  160.             11: {
  161.                 elementid:11,
  162.                 element:theme_config('twt-footer-element-11'),
  163.                 toggle:theme_config('twt-footer-element-11-toggle'),
  164.                 newcol:theme_config('twt-footer-element-11-newcol'),
  165.                 position:theme_config('twt-footer-element-11-position'),
  166.                 order:theme_config('twt-footer-element-11-order')
  167.             }
  168.         }) %}
  169.     {% endif %}
  170.     {# ThemeWare: Determine last element #}
  171.     {% set lastFooterElement = 0 %}
  172.     {% for footerElement in twtFooterElements %}
  173.         {% if footerElement.position == "1" %}
  174.             {% if footerElement.order > lastFooterElement %}
  175.                 {% set lastFooterElement = footerElement.order %}
  176.             {% endif %}
  177.         {% endif %}
  178.     {% endfor %}
  179.     {# ThemeWare: Add ThemeWare upper section #}
  180.     {% set counterTop = 0 %}
  181.     {% for footerElement in twtFooterElements %}
  182.         {% if footerElement.position == "2" %}
  183.             {% set counterTop = ( counterTop | default(0) ) + 1 %}
  184.         {% endif %}
  185.     {% endfor %}
  186.     {% if counterTop >= 1 %}
  187.         <div id="footerColumnsTop"
  188.              class="row footer-columns"
  189.              data-collapse-footer="true"
  190.              role="list">
  191.             {% for footerValueTop in twtFooterElements %}
  192.                 {% if footerValueTop.position == "2" %}
  193.                     {% sw_include '@Storefront/storefront/themeware/footer-elements/twt-' ~ footerValueTop.element ~ '.html.twig' ignore missing with {
  194.                         toggle:footerValueTop.toggle,
  195.                         newcol:footerValueTop.newcol,
  196.                         elementid:footerValueTop.elementid,
  197.                         columns:twtFooterGridColumns,
  198.                         columnsTablet:twtFooterGridColumnsTablet
  199.                     } %}
  200.                 {% endif %}
  201.             {% endfor %}
  202.         </div>
  203.     {% endif %}
  204.     {# ThemeWare: Adjust main section #}
  205.     {% if twtFooterTypeCompatibility == 1 %}
  206.         {# Default block #}
  207.         {{ parent() }}
  208.     {% else %}
  209.         <div id="footerColumns"
  210.              class="row footer-columns"
  211.              data-collapse-footer="true"
  212.              role="list">
  213.             {% for footerValue in twtFooterElements %}
  214.                 {% if footerValue.position == "1" %}
  215.                     {% set last = false %}
  216.                     {% if footerValue.order == lastFooterElement %}
  217.                         {% set last = true %}
  218.                     {% endif %}
  219.                     {% sw_include '@Storefront/storefront/themeware/footer-elements/twt-' ~ footerValue.element ~ '.html.twig' ignore missing with {
  220.                         toggle:footerValue.toggle,
  221.                         newcol:footerValue.newcol,
  222.                         elementid:footerValue.elementid,
  223.                         columns:twtFooterGridColumns,
  224.                         columnsTablet:twtFooterGridColumnsTablet,
  225.                         last:last
  226.                     } %}
  227.                 {% endif %}
  228.             {% endfor %}
  229.         </div>
  230.     {% endif %}
  231.     {# ThemeWare: Add ThemeWare lower section #}
  232.     {% set counterBottom = 0 %}
  233.     {% for footerElement in twtFooterElements %}
  234.         {% if footerElement.position == "3" %}
  235.             {% set counterBottom = ( counterBottom | default(0) ) + 1 %}
  236.         {% endif %}
  237.     {% endfor %}
  238.     {% if counterBottom >= 1 %}
  239.         <div id="footerColumnsBottom"
  240.              class="row footer-columns"
  241.              data-collapse-footer="true"
  242.              role="list">
  243.             {% for footerValueBottom in twtFooterElements %}
  244.                 {% if footerValueBottom.position == "3" %}
  245.                     {% sw_include '@Storefront/storefront/themeware/footer-elements/twt-' ~ footerValueBottom.element ~ '.html.twig' ignore missing with {
  246.                         toggle:footerValueBottom.toggle,
  247.                         newcol:footerValueBottom.newcol,
  248.                         elementid:footerValueBottom.elementid,
  249.                         columns:twtFooterGridColumns,
  250.                         columnsTablet:twtFooterGridColumnsTablet
  251.                     } %}
  252.                 {% endif %}
  253.             {% endfor %}
  254.         </div>
  255.     {% endif %}
  256. {% endblock %}
  257. {# ThemeWare: Remove payment/shipping logos #}
  258. {# TODO: Use payment/shipping footer #}
  259. {% block layout_footer_payment_shipping_logos %}
  260.     {% if twtFooterLogosCompatibility == 1 %}
  261.         {# Default block #}
  262.         {{ parent() }}
  263.     {% elseif twtFooterLogosShow == "paymentshipping" %}
  264.         {# ThemeWare: Adjust logos footer #}
  265.         <div class="footer-logos">
  266.             {% sw_include '@Storefront/storefront/themeware/twt-footer-logos.html.twig' ignore missing %}
  267.         </div>
  268.     {% else %}
  269.         {# ThemeWare: Block cleared #}
  270.     {% endif %}
  271. {% endblock %}
  272. {# ThemeWare: Footer service navigation adjusted #}
  273. {# TODO: Check compatibility #}
  274. {% block layout_footer_service_menu %}
  275.     {# ThemeWare: Add communities #}
  276.     {% if twtFooterBottomElement1 == "communities" %}
  277.         {% block twt_layout_footer_bottom_communities_container %}
  278.             <div class="twt-footer-bottom-element-1">
  279.                 {% block twt_layout_footer_bottom_communities_content %}
  280.                     {% sw_include '@Storefront/storefront/themeware/widgets/twt-communities-include.html.twig' ignore missing with {
  281.                         type: 'footer-bottom'
  282.                     } %}
  283.                 {% endblock %}
  284.             </div>
  285.         {% endblock %}
  286.     {% endif %}
  287.     <div class="container">
  288.         {% block layout_footer_service_menu_content %}
  289.             {# TODO: apply spaceless #}
  290.             <ul class="footer-service-menu list-unstyled">
  291.                 {% for serviceMenuItem in page.header.serviceMenu %}
  292.                     {% block layout_footer_service_menu_item %}
  293.                         <li class="footer-service-menu-item">
  294.                             {# TODO:
  295.                             <a class="footer-service-menu-link"
  296.                                href="{{ category_url(serviceMenuItem) }}"
  297.                                {% if serviceMenuItem.translated.linkNewTab %}target="_blank"{% endif %}
  298.                                title="{{ serviceMenuItem.translated.name }}">
  299.                                 {{ serviceMenuItem.translated.name }}
  300.                             </a>
  301.                             #}
  302.                             <a class="footer-service-menu-link"
  303.                                href="{% if serviceMenuItem.externalLink %}{{ serviceMenuItem.externalLink }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: serviceMenuItem.id }) }}{% endif %}"
  304.                                title="{{ serviceMenuItem.translated.name }}">
  305.                                 {{ serviceMenuItem.translated.name }}
  306.                             </a>
  307.                         </li>
  308.                     {% endblock %}
  309.                 {% endfor %}
  310.             </ul>
  311.             {# TODO: endapply #}
  312.         {% endblock %}
  313.     </div>
  314. {% endblock %}
  315. {# ThemeWare: Copyright footer #}
  316. {% block layout_footer_copyright %}
  317.     <div class="footer-copyright">
  318.         {% sw_include '@Storefront/storefront/themeware/includes/tcinn.html.twig' with {hint:tcinn} %}
  319.     </div>
  320. {% endblock %}