diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2024-05-05 13:38:02 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2024-05-05 13:38:02 -0400 |
commit | fed977bf864eb721fe4bcc5c9c2936bf2164e537 (patch) | |
tree | cf44998dd85c13bd76a2e833733726a96df92d68 /templates/partials/navigation.html.twig | |
parent | acdde303b41ed742681d2fde96507940e1c4dc87 (diff) | |
download | grav-sowtheme-fed977bf864eb721fe4bcc5c9c2936bf2164e537.tar.gz grav-sowtheme-fed977bf864eb721fe4bcc5c9c2936bf2164e537.tar.bz2 grav-sowtheme-fed977bf864eb721fe4bcc5c9c2936bf2164e537.zip |
Fix next and previous arrows and other tweaks
Diffstat (limited to '')
-rw-r--r-- | templates/partials/navigation.html.twig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/templates/partials/navigation.html.twig b/templates/partials/navigation.html.twig index 0c61b1d..46a0c45 100644 --- a/templates/partials/navigation.html.twig +++ b/templates/partials/navigation.html.twig @@ -1,7 +1,6 @@ - {% if page.parent.parent.url == "/" %} <div class="links" id="nextprev"> - {% set prevPage = page.prevSibling() %} + {% set prevPage = page.parent.children().nth(page.parent.children().currentPosition(page.path)-1) %} {% if prevPage %} <a class="anim2" id="prev" href="{{ prevPage.url }}"> <div class="roundedButton"> @@ -14,7 +13,7 @@ </a> {% endif %} - {% set nextPage = page.nextSibling() %} + {% set nextPage = page.parent.children().nth(page.parent.children().currentPosition(page.path)+1) %} {% if nextPage %} <a class="anim3" id="next" href="{{ nextPage.url }}"> <div class="roundedButton"> |