I reopen the ticket In reference to this post:
https://toolset.com/forums/topic/rest-api-3/
This is and example of json paginated
hidden link
hidden link
hidden link
This is ordered by id
But i would output the json like a view ordered by date via parameter/function (now/today)
-------
I have a website about events in rome and i would create an app in flutter to show my visitors nearest location and events
In toolset location and events has a relationship
I'd need this routes:
Next events
- Filter events(cpt) by today()/now() (date/param)
- Ordering by desc data
- Ordering by geo (lat/lon)
Event
- My custom fields
- Location ID (via relationship in toolset location-events)
Location
- My Custom Fields
Location next events
The events in the location-events relationship to show next events in that single location
ordering desc filtered by date
Nearest Locations
- Ordering by geo (lat/lon)
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
As I understand - you want to filter your view by date.
Have you checked the date filters?
=> https://toolset.com/documentation/user-guides/views/date-filters/
Hi Minesh,
No, I have to output the view in json format
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Yes - I understand, to output the view in JSON format you need to chose the loop style of your view - when you format your view's loop output, you need to adjust your output so that it should return JSON format and chose the loop style "List with separators" as show with the following image as last option:
=> https://toolset.com/wp-content/uploads/2019/07/toolset-views-loop-wizard-layout-options.png
More info:
=> https://toolset.com/documentation/legacy-features/views-plugin/view-layouts-101/