<ul{% if include.depth == 2 %} class=“subnavcontent”{% endif %}{% if include.depth == 3 %} class=“subsubnav”{% endif %}> {%- for item in include.data -%}
{%- if include.depth == 1 -%} {%- assign the_url = item.name | slugify | prepend: "/sitemap/#" -%} {%- else -%} {%- assign the_url = item.url -%} {%- endif -%} <li{% if item.cols %} class="has-submenu"{% endif %}> <a{% if include.id %} id="{{item.name | slugify}}"{% endif %} href="{{ the_url }}"><span>{{item.name}}{% comment %}{% if item.pages and include.depth > 1 %} {% include_cached icon.html name="chevron-right" %}{% endif %}{% endcomment %}</span></a> {%- if include.depth>1 -%} {%- if item.pages %}{% assign newdepth = include.depth | plus: "1"%}{% include navlist.html data=item.pages depth=newdepth %}{% endif -%} {%- endif -%} </li> {%- if include.depth==1 -%} <li role="presentation" class="subnav"> {%- if item.cols -%} <div class="col1"> {%- assign navdata = item.cols[0].pages -%} {%- include navlist.html data=navdata depth=2 -%} {%- assign navdata = item.cols[1].pages -%} {%- include navlist.html data=navdata depth=2 -%} {%- assign navdata = item.cols[2].pages -%} {%- include navlist.html data=navdata depth=2 -%} </div> {%- endif -%} </li> {%- endif -%}
{%- endfor -%} </ul>