How to have a "Next" and "Previous button on CMS collection items

In my circumstance I’m looking for a way to link to the next, or the previous CMS item (based on date or some other data).

An example of use would be a collection of blog posts, and a button to navigate between them in order.

Does anyone know how to accomplish this?

1 Like

Not natively, you can simulate it with some work: Native linking to previous and next post or page using CMS - #11 by buryat

3 Likes

Thanks Vincent!

I considered this approach however we have a collection with nearing 200 CMS items, it would laborious to say the least to go back and implement and upkeep linking them in this way.

Just two custom code workaround suggestions:

If the next/prev items do not need to be in chronological order, then with some custom code we can convert the sitemap.xml file to get the next/prev items.

Or if we can create a hidden page listing all the CMS items in the sort order that we want, we could also do this. However there is a limit of 2000 items per page, so if in the future you’ll have more than that amount, the custom code will break.

Hi Vincent,
It appears I can’t message on the thread you suggested for ‘Native linking to previous and next post or page using CMS’.
If you could please help that would be great.
I am trying to achieve what ‘Buryat’ posted on that thread, however its just not working for me for some reason…?
If I’m honest I’m fairly new to webflow so bought a template to get me started but just cant seem to link the next and previous buttons for my Projects.

Here’s the link to the site. If you or anyone else reading this could please take a look and see where I’m going wrong, would be much appreciated:

https://preview.webflow.com/preview/parris-williams-building-contractors-lt?utm_medium=preview_link&utm_source=dashboard&utm_content=parris-williams-building-contractors-lt&preview=65736b1ed441e7be1befadeb05e4e318&mode=preview

Kind Regards,

I’m currently looking into Webflow before jumping completely in and this seems like somewhat of a clear oversight. Are there near-future plans for including this?

4 Likes

Also looking a for this. Is it planned?
Maybe there’s a workaround using pagination while this isn’t an official feature yet?

2 Likes

How is this not a thing still?

10 Likes

@vincent
Have you found a solution to this that does not use Reference fields? I have 5 reference fields already and it wont allow me to create a NEXT and PREVIOUS reference field for the Next or Previous in series

1 Like

Has this been implemented OR what is the best Work-around?

I simply want to have a left and right arrow to go to previous or next. Thought this would be straight forward?

Any tips appreciated, thanks!

3 Likes

I would also love to see this feature, seems pretty simple and could be great. It’s kind of like a “next blog” feature. I’ve wanted to do a meme/photo site, where people would just thumb through things by swiping or clicking to the next thing, and this would be really easy.

1 Like

Finsweet has CMS Previous Next for Webflow