I have a Views 2 view in Drupal that returns JSON. I’d like to page through it using url args. How can I do this?
I tried stuff like path?page=3 or path?page=[3] or path/3 without success.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
path?page=3is correct when dealing w/ a clean install of D6 and Views 2 using the display type Page.If you are using the Views Datasource module, you can create a Page display and change the Style attribute to JSON data document. This uses the same pager system as above.
Please remember that
pathis equivalent topath?page=0. So if you don’t have enough data to get to page 3, this might be the problem.If this answer is not enough or you are using a different method of generating the JSON, please leave a comment and I’ll adjust the answer accordingly.