craftcms / element-api

Create a JSON API/Feed for your elements in Craft.
MIT License
498 stars 57 forks source link

Feature request: getPrevUrls(2) and getNextUrls(2) #94

Closed shoored closed 3 years ago

shoored commented 5 years ago

When working with ElementAPI and a Javascript front-end — for example Vue — the pagination options are a bit slim.

It would be nice to be able to create the same pagination links as we can with Twig Pagination while also preserving the querystrings as is with the current prev and next links in the JSON meta object.

brandonkelly commented 5 years ago

Can you elaborate a bit on this?

simondotwhite commented 5 years ago

I think @studiosyntax means the ability to return the URLs for multiple previous/next links.

https://docs.craftcms.com/v3/dev/tags/paginate.html#nearby-page-links

That's the documentation link for it.

bkmorse commented 4 years ago

This would be an awesome addition to this plugin.