Native linking to previous and next post with titles using CMS

Hello people,

I am very enthusiastic about Webflow but I also miss the navigation between CMS items. I have read the previous posts and used part of the solutions as described. Thanks @hammerhouse and @lux.

When using filters i ran into some issues. The items did show an empty spot on the item page when using filters to show/not show items. Together with my son Jorik who is a very enthusiastic javascript programmer in the making, we have looked at how we can make a solution for this issue. We have changed the content of the script. The id names have remained the same but the script works differently.
The idea is to get all the dynamic items and filter out the ones that have w-condition-invisible
Then it determines if the post is the last or first item, to show the last visible item when pushing the previous button in the first item and to show the first visible item when pushing the next button in the last post.

I did showcase it in a simple cloneable project:

https://webflow.com/website/CMS-post-navigation-with-filter

Kind regards,

Arthur van Veen

7 Likes