src/Notaris/FrontendBundle/Resources/views/module/sidenav.html.twig line 1

Open in your IDE?
  1. {% if smallsidenav is not defined %}
  2.     {% set smallsidenav = false %}
  3. {% endif %}
  4.     <div class="u-hidden@mobile hideforsmartphone">
  5.         <!-- #### FLOATING LEFT COLUMN #### -->
  6.         <aside id="content-left" class="content-left-small">
  7.             {% if preview is defined and preview %}
  8.                 {# NAV BIJ PREVIEW #}
  9.                 <nav class="{{ subsite.stylesheet }}-nav c-sidebar-nav" data-route="{{app.request.get('_route')}}">
  10.                     <ul  class="u-margin-left-none u-padding-left-none">
  11.                         {% for section in subsite.sections if section.parent is null and section.showNavigation %}
  12.                             <li {% if currentslug is defined %}{% if currentslug == section.slug %}class="active"{% endif %}{% endif %}>
  13.                                 <div class='activestate'>&nbsp;</div>
  14.                                 <a href="{% if section.redirectUrl %}{{ section.redirectUrl }}{% else %}{{ path('notaris_admin_cms_section_preexample', {'slug': subsite.slug, 'slugdetail': section.slug }) }}{% endif %}" title="{{ section.navigation | raw  }}">{{ section.navigation | raw }}</a>
  15.                                 {% if currentslug is defined %}
  16.                                     {% if currentslug == section.slug %}
  17.                                         <ul class="u-margin-left-none u-padding-left-none">
  18.                                             {% for children in section.children if children.showNavigation %}
  19.                                                 <li {% if currentslug2 is defined and currentslug2 == children.slug %}class="active"{% endif %}>
  20.                                                     <div class="activestate-niv2">&nbsp;</div>
  21.                                                     {% if 'notaris_frontend_tv' in app.request.get('_route') %}
  22.                                                         <a href="{% if children.redirectUrl %}{{ children.redirectUrl }}{% else %}{{ path('notaris_frontend_tv_detail', {'slug': children.slug }) }}{% endif %}" title="{{ children.navigation | raw  }}">{{ children.navigation | raw  }}</a>
  23.                                                     {% else %}
  24.                                                         {% if currentslug == 'other-languages' or currentslug == 'other-languages-1' %}
  25.                                                             <a href="{{ path('notaris_admin_cms_section_preexample', {'slug': subsite.slug, 'slugdetail': children.slug}) }}" title="{{ children.navigation | raw  }}">{{ children.navigation  | raw  }}</a>
  26.                                                         {% else %}
  27.                                                             <a href="{% if children.redirectUrl %}{{ children.redirectUrl }}{% else %}{{ path('notaris_admin_cms_section_preexample', {'slug': subsite.slug, 'slugdetail': section.slug, 'slugdetail2': children.slug}) }}{% endif %}" title="{{ children.navigation | raw  }}">{{ children.navigation  | raw  }}</a>
  28.                                                         {% endif %}
  29.                                                     {% endif %}
  30.                                                     {% if currentslug2 is defined and currentslug2 == children.slug %}
  31.                                                         <ul class="u-margin-left-none u-padding-left-none">
  32.                                                             {% for subchildren in children.children if subchildren.showNavigation %}
  33.                                                                 <li {% if currentslug3 == subchildren.slug %}class="active"{% endif %}>
  34.                                                                     <div class="activestate-niv3" style="height: 43px;">&nbsp;</div>
  35.                                                                     {% if currentslug == 'other-languages' or currentslug == 'other-languages-1' %}
  36.                                                                         <a href="{{ path('notaris_admin_cms_section_preexample', {'slug': subsite.slug, 'slugdetail': children.slug, 'slugdetail2': subchildren.slug}) }}" title="{{ subchildren.navigation | raw  }}">{{ subchildren.navigation  | raw }}</a>
  37.                                                                     {% else %}
  38.                                                                         <a href="{% if subchildren.redirectUrl %}{{ subchildren.redirectUrl }}{% else %}{{ path('notaris_admin_cms_section_preexample', {'slug': subsite.slug, 'slugdetail': section.slug, 'slugdetail2': children.slug, 'slugdetail3': subchildren.slug}) }}{% endif %}" title="{{ subchildren.navigation | raw  }}">{{ subchildren.navigation  | raw }}</a>
  39.                                                                     {% endif %}
  40.                                                                 </li>
  41.                                                             {% endfor %}
  42.                                                         </ul>
  43.                                                     {% endif %}
  44.                                                 </li>
  45.                                             {% endfor %}
  46.                                         </ul>
  47.                                     {% endif %}
  48.                                 {% endif %}
  49.                             </li>
  50.                         {% endfor %}
  51.                         {% set lastPart = '' %}
  52.                         {% set hide = false %}
  53.                         {% if getControllerName(app.request.attributes) == 'Faq' %}
  54.                             {% if currentPath|split('/') | length > 2 %}
  55.                                 {% set lastPart = currentPath|split('/')[2] %}
  56.                                 {% if lastPart == 'slg_algemeen' | trans or lastPart == 'mybox' %}
  57.                                     {% set hide = true %}
  58.                                 {% endif %}
  59.                             {% endif %}
  60.                         {% endif %}
  61.                         {% if currentslug is not defined %}
  62.                             {% set currentslug = '' %}
  63.                         {% endif %}
  64.                         {% if not hide and currentslug != 'other-languages' and currentslug != 'other-languages-1' and subsite.slug != 'notarimmo' and subsite.slug != 'slg_nieuws' | trans  and subsite.slug != 'slg_voorwaarden' | trans and  subsite.slug != 'contact' and 'notaris_frontend_job' not in app.request.get('_route') and 'notaris_frontend_faq' != app.request.get('_route') and subsite.slug != 'rekenmodules' and subsite.slug != 'calcul_de_frais' %}
  65.                             <li {% if 'notaris_admin_cms_news_preexample' in app.request.get('_route') %}class="active"{% endif %}>
  66.                                 <div class='activestate'>&nbsp;</div>
  67.                                 <a href="{{ path('notaris_admin_cms_news_preexample', {'subsiteslug': subsite.slug}) }}" title="{{ "sn_actueel" | trans | raw }}">{{ "sn_actueel" | trans | raw }}</a>
  68.                             </li>
  69.                             <li {% if 'notaris_frontend_faq_subsite' in app.request.get('_route') %}class="active"{% endif %}>
  70.                                 <div class='activestate'>&nbsp;</div>
  71.                                <a href="{{ path('notaris_frontend_faq_subsite', {'subsiteSlug': subsite.slug}) }}" title="{{ "sn_vragenenantwoorden" | trans | raw }}">{{ "sn_vragenenantwoorden" | trans | raw }}</a>
  72.                             </li>
  73.                             <li {% if 'notaris_frontend_brochures' in app.request.get('_route') %}class="active"{% endif %}>
  74.                                 <div class='activestate'>&nbsp;</div>
  75.                                 <a href="{{ path('notaris_frontend_brochures', {'subsiteSlug': subsite.slug}) }}" title="{{ "md_publi" | trans | raw }}">{{ "md_publi" | trans | raw }}</a>
  76.                             </li>
  77.                             <li {% if 'notaris_frontend_tv_detail' in app.request.get('_route') %}class="active"{% endif %}>
  78.                                 <div class='activestate'>&nbsp;</div>
  79.                                 <a href="{{ path('notaris_frontend_tv_detail', {'slug': subsite.slug}) }}" title="{{ "sv_notaristv" | trans | raw }}">{{ "sv_notaristv" | trans | raw }}</a>
  80.                             </li>
  81.                         {% endif %}
  82.                     </ul>
  83.                 </nav>
  84.             {% else %}
  85.                 {# ------- LIVE NAV -----------  #}
  86.                 <nav class="{{ subsite.stylesheet }}-nav c-sidebar-nav" data-route="{{app.request.get('_route')}}">
  87.                     <ul class="u-margin-left-none u-padding-left-none">
  88.                         {% for section in subsite.sections if section.parent is null and section.isActive and section.showNavigation and not (notaryId is not defined and (
  89.                             (subsite.slug == 'gebruiksvoorwaarden' and section.slug == 'gdpr-gedragscode') or
  90.                             (subsite.slug == 'conditions-dutilisation' and section.slug == 'code-de-conduite-rgpd')
  91.                         )) %}
  92.                             <li {% if currentslug is defined %}{% if currentslug == section.slug %}class="active"{% endif %}{% endif %}>
  93.                                 <div class='activestate'>&nbsp;</div>
  94.                                 {% if section.redirectUrl and ('rekenmodule' in section.redirectUrl or 'calcul' in section.redirectUrl)  %}
  95.                                     {% set rekenmodule = "rekenmodule" %}
  96.                                 {% else %}
  97.                                     {% set rekenmodule = '' %}
  98.                                 {% endif %}
  99.                         <a href="{% if section.redirectUrl %}{{ section.redirectUrl }}{% else %}{{ path('notaris_frontend_subsite_detail', {'slug': subsite.slug, 'slugdetail': section.slug }) }}{% endif %}" {% if rekenmodule != '' %}data-type="{{rekenmodule}}"{% endif %} title="{{ section.navigation | raw  }}">{{ section.navigation | raw }}</a>
  100.                             {% if currentslug is defined %}
  101.                                 {% if currentslug == section.slug %}
  102.                                     <ul class="u-margin-left-none u-padding-left-none">
  103.                                         {% for children in section.children if children.isActive and children.showNavigation %}
  104.                                             <li {% if currentslug2 is defined and currentslug2 == children.slug %}class="active"{% endif %}>
  105.                                                 <div class="activestate-niv2">&nbsp;</div>
  106.                                                 {% if children.redirectUrl and ('rekenmodule' in children.redirectUrl or 'calcul' in children.redirectUrl) %}
  107.                                                     {% set rekenmodule = "rekenmodule" %}
  108.                                                 {% else %}
  109.                                                     {% set rekenmodule = '' %}
  110.                                                 {% endif %}
  111.                                                 {% if 'notaris_frontend_tv' in app.request.get('_route') %}
  112.                                                     <a href="{% if children.redirectUrl %}{{ children.redirectUrl }}{% else %}{{ path('notaris_frontend_tv_detail', {'slug': children.slug }) }}{% endif %}" {% if rekenmodule != '' %}data-type="{{rekenmodule}}"{% endif %} title="{{ children.navigation | raw  }}">{{ children.navigation | raw  }}</a>
  113.                                                 {% else %}
  114.                                                     {% if currentslug == 'other-languages' or currentslug == 'other-languages-1' %}
  115.                                                         <a href="{{ path('notaris_frontend_subsite_detail', {'slug': subsite.slug, 'slugdetail': children.slug}) }}" {% if rekenmodule != '' %}data-type="{{rekenmodule}}"{% endif %} title="{{ children.navigation | raw  }}">{{ children.navigation  | raw  }}</a>
  116.                                                     {% else %}
  117.                                                         <a href="{% if children.redirectUrl %}{{ children.redirectUrl }}{% else %}{{ path('notaris_frontend_subsite_detail2', {'slug': subsite.slug, 'slugdetail': section.slug, 'slugdetail2': children.slug}) }}{% endif %}" {% if rekenmodule != '' %}data-type="{{rekenmodule}}"{% endif %} title="{{ children.navigation | raw  }}">{{ children.navigation  | raw  }}</a>
  118.                                                     {% endif %}
  119.                                                 {% endif %}
  120.                                                 {% if currentslug2 is defined and currentslug2 == children.slug %}
  121.                                                     <ul class="u-margin-left-none u-padding-left-none">
  122.                                                         {% for subchildren in children.children if subchildren.isActive and subchildren.showNavigation %}
  123.                                                             <li {% if currentslug3 == subchildren.slug %}class="active"{% endif %}>
  124.                                                                 <div class="activestate-niv3" style="height: 43px;">&nbsp;</div>
  125.                                                                 {% if subchildren.redirectUrl and ('rekenmodule' in subchildren.redirectUrl or 'calcul' in subchildren.redirectUrl) %}
  126.                                                                    {% set rekenmodule = "rekenmodule" %}
  127.                                                                 {% else %}
  128.                                                                     {% set rekenmodule = '' %}
  129.                                                                 {% endif %}
  130.                                                                 {% if currentslug == 'other-languages' or currentslug == 'other-languages-1' %}
  131.                                                                     <a href="{{ path('notaris_frontend_subsite_detail2', {'slug': subsite.slug, 'slugdetail': children.slug, 'slugdetail2': subchildren.slug}) }}" {% if rekenmodule != '' %}data-type="{{rekenmodule}}"{% endif %} title="{{ subchildren.navigation | raw  }}">{{ subchildren.navigation  | raw }}</a>
  132.                                                                 {% else %}
  133.                                                                     <a href="{% if subchildren.redirectUrl %}{{ subchildren.redirectUrl }}{% else %}{{ path('notaris_frontend_subsite_detail3', {'slug': subsite.slug, 'slugdetail': section.slug, 'slugdetail2': children.slug, 'slugdetail3': subchildren.slug}) }}{% endif %}" {% if rekenmodule != '' %}data-type="{{rekenmodule}}"{% endif %} title="{{ subchildren.navigation | raw  }}">{{ subchildren.navigation  | raw }}</a>
  134.                                                                 {% endif %}
  135.                                                             </li>
  136.                                                         {% endfor %}
  137.                                                     </ul>
  138.                                                 {% endif %}
  139.                                             </li>
  140.                                         {% endfor %}
  141.                                     </ul>
  142.                                 {% endif %}
  143.                             {% endif %}
  144.                             </li>
  145.                         {% endfor %}
  146.                         {% set lastPart = '' %}
  147.                         {% set hide = false %}
  148.                         {% if getControllerName(app.request.attributes) == 'Faq' %}
  149.                             {% if currentPath|split('/') | length > 2 %}
  150.                                 {% set lastPart = currentPath|split('/')[2] %}
  151.                                 {% if lastPart == 'slg_algemeen' | trans or lastPart == 'mybox' %}
  152.                                     {% set hide = true %}
  153.                                 {% endif %}
  154.                             {% endif %}
  155.                         {% endif %}
  156.                         {% if currentslug is not defined %}
  157.                             {% set currentslug = '' %}
  158.                         {% endif %}
  159.                         {% if not hide and currentslug != 'other-languages' and currentslug != 'other-languages-1' and subsite.slug != 'notarimmo' and subsite.slug != 'slg_nieuws' | trans  and subsite.slug != 'slg_voorwaarden' | trans and  subsite.slug != 'contact' and 'notaris_frontend_job' not in app.request.get('_route') and 'notaris_frontend_faq' != app.request.get('_route') and subsite.slug != 'rekenmodules' and subsite.slug != 'calcul_de_frais' and subsite.slug != 'naban_slug' | trans %}
  160.                             <li {% if 'notaris_frontend_subsite_news' in app.request.get('_route') %}class="active"{% endif %}>
  161.                                 <div class='activestate'>&nbsp;</div>
  162.                                 <a href="{{ path('notaris_frontend_subsite_news', {'subsiteslug': subsite.slug}) }}" title="{{ "sn_actueel" | trans | raw }}">{{ "sn_actueel" | trans | raw }}</a>
  163.                             </li>
  164.                             <li {% if 'notaris_frontend_faq_subsite' in app.request.get('_route') %}class="active"{% endif %}>
  165.                                 <div class='activestate'>&nbsp;</div>
  166.                                 <a href="{{ path('notaris_frontend_faq_subsite', {'subsiteSlug': subsite.slug}) }}" title="{{ "sn_vragenenantwoorden" | trans | raw }}">{{ "sn_vragenenantwoorden" | trans | raw }}</a>
  167.                             </li>
  168.                             <li {% if 'notaris_frontend_brochures' in app.request.get('_route') %}class="active"{% endif %}>
  169.                                 <div class='activestate'>&nbsp;</div>
  170.                                 <a href="{{ path('notaris_frontend_brochures', {'subsiteSlug': subsite.slug}) }}" title="{{ "md_publi" | trans | raw }}">{{ "md_publi" | trans | raw }}</a>
  171.                             </li>
  172.                             <li {% if 'notaris_frontend_tv_detail' in app.request.get('_route') %}class="active"{% endif %}>
  173.                                 <div class='activestate'>&nbsp;</div>
  174.                                 <a href="{{ path('notaris_frontend_tv_detail', {'slug': subsite.slug}) }}" title="{{ "sv_notaristv" | trans | raw }}">{{ "sv_notaristv" | trans | raw }}</a>
  175.                             </li>
  176.                         {% endif %}
  177.                     </ul>
  178.                 </nav>
  179.             {% endif %}
  180.             {#<script>
  181.                 $(document).ready(function(e){
  182.                     if( $('.u-hidden@mobile .c-sidebar-nav ul li').length == 1){
  183.                         $('.c-sidebar-nav ul li').addClass('active')
  184.                         {% if 'notaris_frontend_news' in app.request.get('_route') %}
  185.                     }else{
  186.                         if( $('.u-hidden@mobile .c-sidebar-nav ul li.active').length == 0){
  187.                             $('.c-sidebar-nav ul li').first().addClass('active')
  188.                         }
  189.                         {% endif %}
  190.                     }
  191.                 })
  192.             </script>#}
  193.             {#<script>
  194.                 $(document).ready(function(e){
  195.                     if( $('.hidesmartphone aside nav ul li').length == 1){
  196.                         $('aside nav ul li').addClass('active')
  197.                         {% if 'notaris_frontend_news' in app.request.get('_route') %}
  198.                     }else{
  199.                         if( $('.u-hidden@mobile aside nav ul li.active').length == 0){
  200.                             $('aside nav ul li').first().addClass('active')
  201.                         }
  202.                         {% endif %}
  203.                     }
  204.                 });
  205.             </script>#}
  206.         </aside>
  207.     </div>