3

I'm using drupal 7 in conjunction with the recipe module, Every recipe has a number of ingredients that are stored as fields in the database. I'm trying to create an xml view (using views datasource) that lists all of the recipes, but also lists their ingredients. Here is my problem, rather than 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>

the output I'm getting is 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>

It lists it as three seperate nodes, even though there is only one node. I've tried using the "aggregation" settings but still no luck, any ideas?

1
  • Did you ever find a way to do this? I'm using a different display type, but it's also one that doesn't have group by options in the format settings.
    – EmmyS
    Jul 5, 2012 at 15:17

1 Answer 1

0

I use the group by option in the Format settings. If you group by the Title, then Exclude that field from display...you should end up with a list as you describe above.

2
  • 2
    thanks, the only problem is that there is no group by option in the format settings of either JSON or XMl in views datasource.
    – user379468
    Dec 18, 2011 at 20:16
  • hmmm - that changes the answer then doesn't it? good luck! Dec 20, 2011 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.