ui/twig/common/dashboard/sidebar/menuitem.html.twig line 1

Open in your IDE?
  1. {% if _args.path is not defined %}
  2.     {% set link = _args.link|default('#') %}
  3.     {% set path = '' %}
  4. {% else %}
  5.     {% set link = _args.path is not iterable ? path(_args.path) : path(_args.path[0]) %}
  6.     {% set path = _args.path %}
  7. {% endif %}
  8. {% set icon = _args.icon|default(null) %}
  9. {% set iconCustom = _args.iconCustom|default(null) %}
  10. {% set text = _args.text %}
  11. {% set submenu = (_args.submenu is defined) ? (_args.submenu is same as(true)) : false %}
  12. {% set htmlId = _args.htmlId|default(null) %}
  13. <li class="{{ classify('active', path) }}">
  14.     <a href="{{ link }}"{% if htmlId is not null %} id="{{ htmlId }}"{% endif %}>
  15.         {% if icon is not null %}
  16.             <em class="fa fa-{{ icon }}"></em>
  17.         {% endif %}
  18.         {% if iconCustom is not null %}
  19.             <em class="csi {{ iconCustom }}"></em>
  20.         {% endif %}
  21.         <span class="menu-title">{{ text }}</span>
  22.         {% if submenu %}<span class="menu-dd"></span>{% endif %}
  23.     </a>
  24.     {% if submenu %}
  25.         <ul class="cs-sub-menu" style="{{ classify('display: block;', path) }}">
  26.             {% block items %}{% endblock %}
  27.         </ul>
  28.     {% endif %}
  29. </li>