I have the module currently set up to display a feed of events via JSON such as

{
  "events" : [
    {
      "event" : {
        "title" : "OCAC 20th Anniversary Teapot Show",
        "event_date" : "<span class=\"date-display-start\" property=\"dc:date\" datatype=\"xsd:dateTime\" content=\"2013-01-10T12:00:00-08:00\">January 10, 2013</span> to <span class=\"date-display-end\" property=\"dc:date\" datatype=\"xsd:dateTime\" content=\"2013-01-30T12:00:00-08:00\">January 30, 2013</span>",
        "node_path" : "/ocac-20th-anniversary-teapot-show",
        "body" : " <p>Celebrating 20 years of the Teapot Class at OCAC with over 30 teapots from our alumni around the United States.</p>\n<p>Entering its 20th year, OCAC’s 3rd Year Teapot Class provides an essential step in developing the vocabulary of a metal smith. Focusing on traditions dating back to ancient history that are still practiced today—raising and forming, large scale soldering and fitting processes—students design and create a functional teapot in one semester. Making decisions about construction methods and design, choosing materials for handles, and studying historical and contemporary examples of teapots and other hollowware, students have the opportunity to deepen their understanding of the creation of utilitarian objects and how to balance design and function. This intensive experience prepares OCAC students for careers as professional makers.</p>\n<p>See more of the show <a href=\"http://www.flickr.com/photos/ocacedu/sets/72157632591699021/\">here</a></p>\n ",
        "event_location" : "HOFFMAN GALLERY",
        "sub_heading" : "Opening Reception | Thursday, January 10 | 4-7:30pm",
        "body_subtext" : "artist: Sarah Hall",
        "event_image" : "https://syndication.ocac.edu/sites/syndication.ocac.edu/files/styles/medium/public/teapotonwheels.jpg?itok=31aRBoPB",
        "node_link" : "<a href=\"/ocac-20th-anniversary-teapot-show\">view</a>",
        "photo_credit" : "Beth Conyers",
        "taxonomy_terms" : "<a href=\"/taxonomy/term/5\" typeof=\"skos:Concept\" property=\"rdfs:label skos:prefLabel\" datatype=\"\">Oregon College of Art and Craft</a>",
        "update_date" : "Friday, April 5, 2013 - 10:08"
      }
    },
...
]
}

It works well, but ultimately, I would like to group these events (via JSON) by date (i.e. "January 21, 2013") and have all events on that date be displayed.

Is this possible?

Comments

anthonylindsay’s picture

Status: Active » Closed (won't fix)

I don't believe that it is possible with views_datasource as it stands.

Alternative solutions might be to

  1. include the date in the feed and sort by date, and then get the client to parse your feed and display the date as a heading, simulating the grouping
  2. or filter by date and get the client to request discrete dates.

The first one is probably easier/more useful as I think about it.

In order to get a date grouping in you're talking about a multi-level data structure, which views_datasource is not cut out for at the moment. However, work is underway here: #1699368: #RVDA: Rewrite Views Datasource's Architecture

laughnan’s picture

@anthonylindsay thanks for the follow-up. I will look into your suggestions.