No results using collection:previous and collection:next ? #4703
Answered
by
jesseleite
LeoSeyers
asked this question in
Troubleshooting
-
Hello, I do have multiple entries in my "articles" collection so I'm not sure why it wouldn't work here. Any hint is appreciated {{ collection}} // "articles"
{{ date }} // November 8th, 2021
{{ collection:next in="articles" as="posts" sort="date:asc" }}
{{ if no_results }}
No more posts to read!
{{ /if }}
{{ posts }}
<div class="post">
<a href="{{ url }}">{{ title }}</a>
</div>
{{ /posts }}
{{ /collection:next }} |
Beta Was this translation helpful? Give feedback.
Answered by
jesseleite
Nov 10, 2021
Replies: 1 comment 1 reply
-
If the current article is Nov 8th, 2021, can you confirm that you have articles that are dated before and after that date? Also what do you get if you throw a corresponding |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LeoSeyers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the current article is Nov 8th, 2021, can you confirm that you have articles that are dated before and after that date? Also what do you get if you throw a corresponding
{{ collection:previous }}
on the same page there?