{%- set paths = page.path.split('/') %} {%- set count = paths.length %} {%- if count > 2 %} {%- set current = 0 %} {%- set link = '' %} {%- endif %}