Keyword

Limitstart not working with JSON output

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 4 months ago #160160 by Steven Trooster
Limitstart not working with JSON output was created by Steven Trooster
When I use the json format as an output, the pagination / limitstart doesn't work. I always get the first items, even if limitstart is set to a higher number than the limit.
index.php?option=com_k2&view=itemlist&limit=10&limitstart=0&format=json
and
index.php?option=com_k2&view=itemlist&limit=10&limitstart=10&format=json

produce the same output.
The limit parameter though does work. I can't find what's wrong in view.json.php.

Using K2 v2.7.1 on Joomla 3.6.5

Please Log in or Create an account to join the conversation.

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 4 months ago #160161 by Steven Trooster
Replied by Steven Trooster on topic Limitstart not working with JSON output
Found it: for some reason the json view uses page as a parameter in stead of limitstart. So requesting the next 10 items needs page=1.
index.php?option=com_k2&view=itemlist&limit=10&page=1&format=json

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 4 months ago #160252 by Krikor Boghossian
Replied by Krikor Boghossian on topic Limitstart not working with JSON output
Glad to see you sorted this out Steven.

Please Log in or Create an account to join the conversation.

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 4 months ago #160271 by Steven Trooster
Replied by Steven Trooster on topic Limitstart not working with JSON output
Why is there a different pagination parameter for the html and the json view?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum