{% if _args.path is not defined %}
{% set link = _args.link|default('#') %}
{% set path = '' %}
{% else %}
{% set link = _args.path is not iterable ? path(_args.path) : path(_args.path[0]) %}
{% set path = _args.path %}
{% endif %}
{% set icon = _args.icon|default(null) %}
{% set iconCustom = _args.iconCustom|default(null) %}
{% set text = _args.text %}
{% set submenu = (_args.submenu is defined) ? (_args.submenu is same as(true)) : false %}
{% set htmlId = _args.htmlId|default(null) %}
<li class="{{ classify('active', path) }}">
<a href="{{ link }}"{% if htmlId is not null %} id="{{ htmlId }}"{% endif %}>
{% if icon is not null %}
<em class="fa fa-{{ icon }}"></em>
{% endif %}
{% if iconCustom is not null %}
<em class="csi {{ iconCustom }}"></em>
{% endif %}
<span class="menu-title">{{ text }}</span>
{% if submenu %}<span class="menu-dd"></span>{% endif %}
</a>
{% if submenu %}
<ul class="cs-sub-menu" style="{{ classify('display: block;', path) }}">
{% block items %}{% endblock %}
</ul>
{% endif %}
</li>