{% if not this.hidden %}
{% set menuCssClass = this.cssClass ~ (this.active?" active":"") ~ (this.children?" dropdown":"") %}
<li class="nav-item {% if menuCssClass %}{{ menuCssClass }}{% endif %}">
{%- if this.url is defined or this.children  %}<a href="{{ this.link ? this.link : '#' }}" class="nav-link {% if this.children %}dropdown-toggle{% endif %}" {% if this.children %}data-toggle="dropdown"{% endif %}>{{ this.label }} {% if children %}<b class="caret"></b>{% endif %}</a>{% else %}{{ this.label }}{% endif -%}
{% if this.children %}
    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
        {%- for child in this.children -%}
            <a class="dropdown-item" href="{{- child.link -}}">{{- child.label -}}</a>
        {%- endfor -%}
    </div>
{%- endif -%}
</li>
{% endif %}

{% if not this.hidden %}
{% set menuCssClass = this.cssClass ~ (this.active?" active":"") ~ (this.children?" dropdown":"") %}
<li class="nav-item {% if menuCssClass %}{{ menuCssClass }}{% endif %}">
{%- if this.url is defined or this.children  %}<a href="{{ this.link ? this.link : '#' }}" class="nav-link {% if this.children %}dropdown-toggle{% endif %}" {% if this.children %}data-toggle="dropdown"{% endif %}>{{ this.label }} {% if children %}<b class="caret"></b>{% endif %}</a>{% else %}{{ this.label }}{% endif -%}
{% if this.children %}
    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
        {%- for child in this.children -%}
            {% if not child.hidden %}
                <a class="dropdown-item" href="{{- child.link -}}">{{- child.label -}}</a>
            {% endif %}
        {%- endfor -%}
    </div>
{%- endif -%}
</li>
{% endif %}

Fix child hidden in conditionnal
Fix child hidden in conditionnal