- From: Felix Ostrowski via GitHub <sysbot+gh@w3.org>
- Date: Wed, 29 Mar 2017 13:43:54 +0000
- To: public-hydra-logs@w3.org
literarymachine has just created a new issue for https://github.com/HydraCG/Specifications:
== Linking to multiple PartialCollectionView from Collection ==
When implementing pagination in a front end e.g. with [Bootstrap](http://getbootstrap.com/components/#pagination), one often needs not only `first` / `last` / `next` / `previous` links but also an explicit list of pages. Neither in #42 nor in http://www.hydra-cg.com/spec/latest/core/#collections I can see this issue addressed; is there a suggested way of handling this in Hydra? Would it perhaps be an option to simply add an ordered list of `PartialCollectionView` to `Collection` using `view`?
```
{
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
"@id": "http://api.example.com/an-issue/comments",
"@type": "Collection",
"totalItems": "4980",
"member": [
... a subset of the members of the Collection ...
],
"view": {
"@list": [
{
"@id": "http://api.example.com/an-issue/comments?page=1",
"@type": "PartialCollectionView"
},
{
"@id": "http://api.example.com/an-issue/comments?page=2",
"@type": "PartialCollectionView"
},
{
"@id": "http://api.example.com/an-issue/comments?page=3",
"@type": "PartialCollectionView"
}
]
}
}
```
It also seems that in such a use case, it would be ok for `first` / `last` / `next` / `previous` to be omitted.
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/112 using your GitHub account
Received on Wednesday, 29 March 2017 13:44:04 UTC