1 <ul>{% for item in include.menu %}<!--
2 {% comment %} We compute the full URL of this item, and truncate canonicalurl so that length so we can test whether it starts with it {% endcomment %}
3 {% assign cururl = item.url | prepend: include.base %}
4 {% assign isparent_search = canonicalurl | truncate: cururl.size, '' %}
5 {% capture class %}{% if cururl == canonicalurl %}current{% elsif include.above != true %}child{% elsif isparent_search == cururl %}parent{% else %}sibling{% endif %}{% endcapture %}
6 {% comment %} Now we can output the item and it substructure. Try hard not to output unnecessary spaces! {% endcomment %}
7 --><li class="{{ class }}"><a href="{{ item.url | prepend: include.base }}">{{ item.title }}</a></li><!--
8 {% if item.structure and (class == "current" or class == "parent") %}
9 {% if cururl == canonicalurl %}{% assign above = false %}{% else %}{% assign above = true %}{% endif %}
10 -->{% include menu-level.html menu=item.structure base=cururl above=above %}<!--