Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 '12 at 15:17

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
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 '11 at 20:16
    
hmmm - that changes the answer then doesn't it? good luck! –  jeff_shamley Dec 20 '11 at 20:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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