diff --git a/_layouts/default.html b/_layouts/default.html
index 860efe6..a40c0b7 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -100,13 +100,11 @@ layout: table_wrappers
Table of contents
- {%- assign children_list = pages_list | where: "parent", node.title -%}
+ {%- assign children_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%}
{% for child in children_list %}
- {% if child.parent == page.title and child.title != page.title and child.grand_parent == page.parent %}
- -
- {{ child.title }}{% if child.summary %} - {{ child.summary }}{% endif %}
-
- {% endif %}
+ -
+ {{ child.title }}{% if child.summary %} - {{ child.summary }}{% endif %}
+
{% endfor %}
{% endif %}