src/CorporateTrainingBundle/Resources/views/homepage/component/navigation/nav.html.twig line 1

Open in your IDE?
  1. {% set navigations = data('NavigationsTree', {}) %}
  2. {% set topNavNum = rules.num|default(7) %}
  3. {% for nav in navigations[:topNavNum]  %}
  4.   {% if nav.isOpen %}
  5.     {% set subNavs = nav.children|default([]) %}
  6.     {% include '@CorporateTraining/homepage/component/navigation/nav-li.html.twig' %}
  7.   {% endif %}
  8. {% endfor %}
  9. {% if navigations|length > topNavNum %}
  10.   <li class="nav-more nav-hover">
  11.     <a class="more" style="cursor:pointer">
  12.       <span>{{ 'site.datagrid.filter.category_more'|trans }}</span>
  13.       <i class="es-icon es-icon-arrow-down arrow-hover-bottom" style="font-size: 12px"></i>
  14.       <i class="es-icon es-icon-shangjiantou arrow-hover-top" style="font-size: 12px"></i>
  15.     </a>
  16.     <ul class="dropdown-menu" role="menu">
  17.       {% for nav in navigations[topNavNum:] %}
  18.         {% if nav.isOpen %}
  19.           {% set subNavs = nav.children|default([]) %}
  20.           {% include '@CorporateTraining/homepage/component/navigation/nav-li.html.twig' %}
  21.         {% endif %}
  22.       {% endfor %}
  23.     </ul>
  24.   </li>
  25. {% endif %}