{%- assign tocNodes = hierarchy | where_exp:"item", "item.name == page.id" | map: "items" | first -%} {%- if tocNodes.size > 0 -%}