Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By jasper.van.loon on
I have problems to create a json view (rest export) in Drupal 8, my goal : select count(*) from content type = "..." and published = yes
The output must be json notation and the total amount of nodes for a specific content type.
In the Advanced selection I set "use aggregation = yes"
under Fields I use the aggregation setting "count" on content type
Filter criteria: published status = yes, content type = myCT
Result: [{"type":"1"},{"type":"1"},{"type":"1"},....]
I did the same in drupal 7 without any issues but can't get it work in D8.
Has anybody an idea how to get this solved
Comments
it's solved. had the wrong
it's solved. had the wrong sort criteria selected. It must be sorted on "content type".