Problem/Motivation

When a view is created with "REST export" and pagination is selected, the pagination links are not created or shown in the JSON output.

Making this issue as a "Feature Request" since this is not a blocker but in long run this will be a must have item.

Steps to Reproduce

  1. Create a new build in (https://simplytest.me) with latest Drupal RC and Devel module selected.
  2. Enable the following modules:
    • RESTful Web Services
    • Serialization
    • HTTP Basic Authentication
    • HAL
    • Devel
    • Devel generate
  3. Generate 50 articles or for other content type. This content type we will use for creating the view.
  4. Create a Rest Export View like the attached export: EXPORT
  5. Give permission "Access GET on Content resource" to every user.
  6. See the resource representation
  7. If formatted with http://pro.jsonlint.com/ we can see only 5 results are displayed and there is no quick links to navigate to next pages.

Proposed resolution

The resource representation should display pagination links with total count and current page count along with the list of pagination links following Drupal standard. As example,

  1. If Mini Pager is selected: Show only "Previous" & "Next" links.
  2. If full pager is selected: Show the same pagination links as it shows in the front end.

Something like: http://phlyrestfully.readthedocs.org/en/latest/halprimer.html#collections

Remaining tasks

  1. Discuss on IRC about this issue.
  2. Write patch
  3. Write tests
  4. Review

User interface changes

TBD

API changes

TBD

Data model changes

TBD

CommentFileSizeAuthor
views.view_.hal_pagination_test.yml5.56 KBaneek
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aneek created an issue. See original summary.

aneek’s picture

Issue summary: View changes
dawehner’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.