templates/home/products.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% block title %}
  3.     {% for cms_copy in cms_copy_array %}
  4.         {% if cms_copy.ranking == 1 %}
  5.             {% if cms_copy.tabTitle is defined %}
  6.                 {{ attribute(cms_copy,'tabTitle'~LanguagesService.getSelectedLanguageCode)|raw }}
  7.             {% else %}
  8.                 {% if CompanyDetails.getCompanyDetails is not null %}
  9.                     {{ CompanyDetails.getCompanyDetails.companyName }}
  10.                 {% else %}
  11.                     {{ product~Languages.getSelectedLanguageCode }}
  12.                 {% endif %}
  13.             {% endif %}
  14.         {% endif %}
  15.     {% endfor %}
  16. {% endblock %}
  17. {% block body %}
  18.     <section id="my-service-section" class="default-bg-white">
  19.         <div class="default-space"></div>
  20.         <div class="container">
  21.             <div class="row">
  22.                 <div class="col-lg-12 col-md-12 col-sm-12 col-12">
  23.                     <div class="default-title">
  24.                         {% include 'home/products_page/title.html.twig' %}
  25.                     </div>
  26.                 </div>
  27.             </div>
  28.             {% include 'template_parts_project_specific/home_page_project_specific.html.twig' %}
  29.             <div class="row">
  30.                 {% if cms_photo_array is not empty %}
  31.                 <div class="col-md-6">
  32.                     {% else %}
  33.                     <div class="col-12">
  34.                         {% endif %}
  35.                         {% for cms_copy in cms_copy_array|sort((a, b) => a.ranking <=> b.ranking) %}
  36.                             {% if is_granted('ROLE_ADMIN') %}
  37.                                 <a target="_blank" href="{{ path('cms_copy_edit', {'id': cms_copy.id}) }}">
  38.                                     <i style="color: red" class="fa fa-pen"></i>
  39.                                 </a>
  40.                             {% endif %}
  41.                             {% if cms_copy.pageLayout is not null %}
  42.                                 {% if cms_copy.getPageLayout.name  == "Accordion" or cms_copy.pageLayout is null %}
  43.                                     {% include 'home/products_page/formats/accordion.html.twig' %}
  44.                                 {% endif %}
  45.                                 {% if cms_copy.getPageLayout.name  == "Card Layout" %}
  46.                                     {% include 'home/products_page/formats/card_layout.html.twig' %}
  47.                                 {% endif %}
  48.                                 {% if cms_copy.getPageLayout.name  == "Carousel/Slider" %}
  49.                                     {% include 'home/products_page/formats/carousel_slider.html.twig' %}
  50.                                 {% endif %}
  51.                                 {% if cms_copy.getPageLayout.name  == "Fullscreen Sections" %}
  52.                                     {% include 'home/products_page/formats/fullscreen_sections.html.twig' %}
  53.                                 {% endif %}
  54.                                 {% if cms_copy.getPageLayout.name  == "Grid Layout" %}
  55.                                     {% include 'home/products_page/formats/grid_layout.html.twig' %}
  56.                                 {% endif %}
  57.                                 {% if cms_copy.getPageLayout.name  == "Hero Banner" %}
  58.                                     {% include 'home/products_page/formats/hero_banner.html.twig' %}
  59.                                 {% endif %}
  60.                                 {% if cms_copy.getPageLayout.name  == "List/Stacked Content" %}
  61.                                     {% include 'home/products_page/formats/list_stacked_content.html.twig' %}
  62.                                 {% endif %}
  63.                                 {% if cms_copy.getPageLayout.name  == "Masonry Layout" %}
  64.                                     {% include 'home/products_page/formats/masonry_layout.html.twig' %}
  65.                                 {% endif %}
  66.                                 {% if cms_copy.getPageLayout.name  == "Parallax Scrolling" %}
  67.                                     {% include 'home/products_page/formats/parallax_scrolling.html.twig' %}
  68.                                 {% endif %}
  69.                                 {% if cms_copy.getPageLayout.name  == "Sidebar Layout" %}
  70.                                     {% include 'home/products_page/formats/sidebar_layout.html.twig' %}
  71.                                 {% endif %}
  72.                                 {% if cms_copy.getPageLayout.name  == "Single Page Scroll" %}
  73.                                     {% include 'home/products_page/formats/single_page_scroll.html.twig' %}
  74.                                 {% endif %}
  75.                                 {% if cms_copy.getPageLayout.name  == "Split Screen" %}
  76.                                     {% include 'home/products_page/formats/split_screen.html.twig' %}
  77.                                 {% endif %}
  78.                                 {% if cms_copy.getPageLayout.name  == "Sticky Header/Footer" %}
  79.                                     {% include 'home/products_page/formats/sticky_header_footer.html.twig' %}
  80.                                 {% endif %}
  81.                                 {% if cms_copy.getPageLayout.name  == "Tabbed Interface" %}
  82.                                     {% include 'home/products_page/formats/tabbed_interface.html.twig' %}
  83.                                 {% endif %}
  84.                                 {% if cms_copy.getPageLayout.name  == "Timeline Layout" %}
  85.                                     {% include 'home/products_page/formats/timeline_layout.html.twig' %}
  86.                                 {% endif %}
  87.                             {% else %}
  88.                                 {% include 'home/products_page/formats/accordion.html.twig' %}
  89.                             {% endif %}
  90.                         {% endfor %}
  91.                     </div>
  92.                     <div class="col-md-6">
  93.                         {% for cms_photo in cms_photo_array %}
  94.                             <div class="d-inline-block justify-content-center py-1 p-sm-2 product-image-container">
  95.                                 <div class="image-wrapper">
  96.                                     {% include 'home/products_page/photo_or_video.html.twig' %}
  97.                                 </div>
  98.                             </div>
  99.                         {% endfor %}
  100.                     </div>
  101.                     <!------------------ END FIRST GROUP OF PHOTOS --------------->
  102.                     <div class="row">
  103.                         <div class="col-12">
  104.                             {% for sub_page in sub_pages %}
  105.                                 <ul>
  106.                                     <a target="_blank"
  107.                                        href="{{ path('sub_page_show', {id: sub_page.id} ) }}">{{ sub_page.title }}</a>
  108.                                 </ul>
  109.                             {% endfor %}
  110.                         </div>
  111.                     </div>
  112.                 </div>
  113.             </div>
  114.     </section>
  115.     {% if CompanyDetailsService.companyDetails is not null %}
  116.         {% if include_contact_form ==1 %}
  117.             {% include 'home/parts/contact_us.html.twig' %}
  118.             {#            {% include 'home/parts/contact_us.html.twig' with { form: form } %} #}
  119.         {% endif %}
  120.         {% set qr_code =  CompanyDetailsService.companyDetails.companyQrCode %}
  121.         {% if include_qr_code == 1 and qr_code is not null %}
  122.             {% include 'home/parts/qr_code.html.twig' %}
  123.         {% endif %}
  124.     {% endif %}
  125. {% endblock %}
  126. {% block additionaljs %}
  127.     {% if include_contact_form == 1 %}
  128.         <script>
  129.             $(document).ready(function () {
  130.                 $("input[name='website_contacts[status]']").closest(".form-group").remove();
  131.                 $("input[name='website_contacts[dateTime]']").closest(".form-group").remove();
  132.                 $("input[name='website_contacts[dateResponded]']").closest(".form-group").remove();
  133.             });
  134.         </script>
  135.     {% endif %}
  136. {% endblock %}