<ul>
    <repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}">
        
        <li><a href="{{ @item.href }}" >{{ @item.name }}</a>
            <check if="{{ is_array(@item.submenu) }}">
                <include href="navigation.htm" with="menu={{ @item.submenu }}" />
            </check>
        </li>

    </repeat>
</ul>

<check if="{{ false }}">
<ul>
  <repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}">
    <check if="{{ is_array(@item) }}">
      <true>
        <li class="{{ in_array(@key,$url)?'active':'away' }}">
          <a href="{{ @SITE_URL }}/{{ @key }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item.index }}</a>
          
          <check if="{{ count(@item) > 1 }}">
            <ul>
              <repeat group="{{ @item }}" key="{{ @key2 }}" value="{{ @item2 }}">
                <check if="{{ @key2 != 'index'}}">
                  <li class="{{ (in_array(@key2,$url) && in_array(@key,$url))?'active':'away' }}">
                    <a href="{{ @SITE_URL }}/{{ @key }}/{{ @key2 }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item2 }}</a>
                  </li>
                </check>
              </repeat>
            </ul>
          </check>
          
        </li>
      </true>
      <false>
        <li class="{{ in_array(@key,$url)?'active':'away' }}">
          <a href="{{ @SITE_URL }}/{{ @key }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item }}</a>
        </li>
      </false>
    </check>
  </repeat>
</ul>
</check>
