{% assign pages_list2 = pages_list | sort:"nav2-weight" %} {% for node in pages_list2 %} {% if node.nav1 == include.nav1 and node.nav1-show != true and node.nav2-show == true %} {% if page.nav2 == node.nav2 %}