templates/inc_webMenu.html.twig line 1

Open in your IDE?
  1. {% if entities|length>0%}
  2.     <ul>
  3.    {% for entity in entities %}
  4.         {% if (entity.visible) %}
  5.         {%if actual==entity.id or parentDisabled==1%}
  6.             {%set disabled=1%}
  7.         {%endif%}
  8.         {#%if disabled==1 %}disabled="disabled"{%endif%} {%if selected==entity.id%}selected="selected"{%endif%#}
  9.         {% set sUrl = '#' %}
  10.         {% if (attribute(entity, 'url'~(app.request.locale|capitalize)) != '') %}
  11.             {% set sUrl = attribute(entity, 'url'~(app.request.locale|capitalize)) %}
  12.         {%else%}
  13.             {%if entity.getPagina() is not null%}
  14.                 {#{ dump (entity.getPagina()) }#}
  15.                 {#{attribute(entity.getPagina(), 'slug'~(app.request.locale|capitalize))}#}
  16.                 {% set sUrl = path  ('paginas', 
  17.                                     {   '_locale'   :app.request.locale,
  18.                                         '_slug'     :attribute(entity.getPagina(), 'slug'~(app.request.locale|capitalize))}
  19.                                     )%}
  20.             {% else %}
  21.                 {% if (entity.getRutaArxiu(app.request.locale) != '') %}
  22.                     {% set sUrl = '/uploads/menu_opcions/'~entity.getRutaArxiu(app.request.locale) %}
  23.                 {% endif %}
  24.                                     
  25.             {%endif%}    
  26.         {%endif%}
  27.         <li{% if sUrl == '#' %} class="has-dropdown not-click" {% endif %}>
  28.             <a href="{{sUrl}}" target="{{entity.target}}">
  29.                 {{attribute(entity, 'titol'~(app.request.locale|capitalize))}}
  30.             </a>
  31.             {{ render(controller('App\\Controller\\frontoffice\\MenuOpcioController::showMenuPrincipalAction', { 'id' : entity.getId(),'level':level+1,'actual':actual,'selected':selected,'parentDisabled':parentDisabled,'nomback':attribute(entity, 'titol'~(app.request.locale|capitalize))})) }}
  32.         </li>
  33.         
  34.         {#{dump (entity.children)}#}
  35.         
  36.         
  37.         
  38.         {#% include 'App::inc_webMenu.html.twig' with {'entities':entity.children,'level':level+1,'actual':actual,'selected':selected,'parentDisabled':disabled}%#}
  39.         {%set disabled=0%}
  40.         {% endif %}
  41.     {% endfor %}
  42.     </ul>
  43. {% endif%}