{% if include.item.children %} {{include.item.title}} {% assign pageurl = page.url | remove: '.html' %} {% capture capturechild %} {% for child in include.item.children %} {% assign active = "" %} {% assign childurlfolder = child.url | append: '/' %} {% if pageurl == child.url or pageurl == childurlfolder %} {% assign active = "active bd-sidenav-active" %} {% endif %}