geopython / pygeoapi

pygeoapi is a Python server implementation of the OGC API suite of standards. The project emerged as part of the next generation OGC API efforts in 2018 and provides the capability for organizations to deploy a RESTful OGC API endpoint using OpenAPI, GeoJSON, and HTML. pygeoapi is open source and released under an MIT license.
https://pygeoapi.io
MIT License
499 stars 262 forks source link

Previous and Next Links do not work #310

Closed geekdenz closed 4 years ago

geekdenz commented 4 years ago

Description Previous and next links on the viewer of a single item do not work.

Steps to Reproduce Steps to reproduce the behavior:

  1. Go to a specific item.
  2. Click on previous or next link.

Expected behavior Previous or next item shows when link is clicked, but same item is displayed.

Environment

alpha-beta-soup commented 4 years ago

Expected behavior Previous or next item shows when link is clicked, but same item is displayed.

My expected behaviour would be either:

And also:

tomkralidis commented 4 years ago

This may or may not be trivial for a given provider backend to come up with. Having said this, +1 for removing prev/next links from pygeoapi/templates/item.html in #311

geekdenz commented 4 years ago

@tomkralidis thanks for your feedback.

The previous/next links are broken before this fix for all providers. This fixes it for the pgsql provider and I think it's definitely possible to fix it, at least somewhat, for other providers. Also, I tested this with other providers and it didn't break anything further because the link then just does not work.

Maybe the previous/next links should be removed only for providers where it's not implemented. I'm happy to do this change.

Having said all that it might not be trivial to merge this fix in. If you like I can have a go at merging it into current master. Please let me know.

tomkralidis commented 4 years ago

Thanks @geekdenz. I think it's safe to not assume all providers can implement this functionality and we can test for this in HTML mode, which you're implemented (thanks!). Minor comments remaining in #311.