{% if page is defined %} {% set len = page.components | length %} {% set p = page.components | slice(end=len - 1) | join(sep='/') %} {% else %} {% set p = section.components | join(sep='/') %} {% endif %}