There was a sililar post about views grouping for the 6.x version, however, the views group by module is not available for drupal 7 so that is not a viable option. My current output is like this

<node> 
    <title>The Title<title>
    <ingredient name> Ingred 1<ingredient name>
  <node>

  <node> 
    <title>The Title<title>
    <ingredient name> Ingred 2<ingredient name>
  <node>

  <node> 
    <title>The Title<title>
    <ingredient name> Ingred 3<ingredient name>
  <node>

this is the same node output three times, one for each field, instead I would like the output to be like this

<node> 
<title>The Title<title>
<ingredient name> Ingred 1<ingredient name>
<ingredient name> Ingred 2<ingredient name>
<ingredient name> Ingred 3<ingredient name>
<node>

I tried using the aggregation option, but no luck

Comments

dom.’s picture

Hi !

Awsome module ! But grouping is really missing... I would enjoy that functionnality too.

Miro.

alexander allen’s picture

Status: Active » Closed (fixed)
Issue tags: +#VDS-A, +#RVDA

Yup, we all want grouping, no?
Well, jump into the testing party van at #1699368: #RVDA: Rewrite Views Datasource's Architecture and #1623606: Views Datasource 2.x branch for a better world!

FYI, I'm marking this as closed fixed because there are already plenty of mentions in the #VDS-A tag about grouping, but again, feel free to become part of our team of testers. Many thanks!

dericke’s picture

I've been muddling my way through creating a grouping functionality that can serve my employer's purposes. We have a fork in a bitbucket at https://bitbucket.org/wwuweb/views_datasource_wwu. I have no experience with module development, my code is probably pretty ugly, and I welcome all constructive feedback. We're just working on the JSON component. My goal is to group events by buildings they occur in, so that a webmap can grab the fields from all events for each building.

dericke’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs review
StatusFileSize
new3.25 KB

Here's a patch to enable grouping for JSON only for the 7.x-1.x branch, since the aforementioned 2.x rewrite isn't around.

dericke’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs review
StatusFileSize
new3.25 KB

Here's a patch to enable grouping for JSON only for the 7.x-1.x branch, since the aforementioned 2.x rewrite isn't around.

milos.kroulik’s picture

Status: Needs review » Needs work

The patch applies, but the output is very strange - it groups values by field, not by value of the field, that I chose.

Edit: Sorry, it works as described.

anthonylindsay’s picture

Status: Needs work » Fixed
anthonylindsay’s picture

Status: Fixed » Closed (fixed)

closing

gedur’s picture

This patch introduces notices when no group exists:

Notice: Undefined offset: 0 en include() (line 15 sites/all/modules/contrib/views_datasource/views/theme/views-views-json-style-simple.tpl.php).
Notice: Undefined index: en include() (line 18 de sites/all/modules/contrib/views_datasource/views/theme/views-views-json-style-simple.tpl.php).
Notice: Trying to get property of non-object en include() (línea 18 de sites/all/modules/contrib/views_datasource/views/theme/views-views-json-style-simple.tpl.php).

Note this is not possible to reopen this issue as it is marked as Closed FIxed, drupal issues should be marked and fixed and the system automatically will change it to closed after two weeks if not issues are reported.

Thanks!