From dc3961c2bfc433ae261ac956ceda3b41c7befeda Mon Sep 17 00:00:00 2001 From: Steven Morse Date: Wed, 4 Sep 2024 12:50:40 -0400 Subject: [PATCH] fix buttons --- _layouts/default.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 18ca578..66833fe 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -45,15 +45,17 @@ {% assign next_page = null %} {% assign found = false %} - {% for item in site.data.navigation %} - {% if item.children %} - {% for child in item.children %} + {% for parent in site.data.navigation %} + {% if parent.children %} + {% for child in parent.children %} {% if child.url %} - {% if child.url == page.url %} - {% assign found = true %} - {% elsif found %} + {% if found %} {% assign next_page = child %} {% break %} + {% endif %} + + {% if child.url == page.url %} + {% assign found = true %} {% else %} {% assign prev_page = child %} {% endif %}