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 would like to create a view, which would list all the events of an organization (please look at the mockup). The problem is, that some of the are part of longer series, so I had to group them somehow. So now I have 2 content types (Event and Series of Events), the latter contains Field Collection field with multiple instances, which is used for sub-events. (Please see the scheme)

I use common date field for "Event" nodes and "Sub-event" field collection items, but I can't sort by it, because for "Sub-event" I would need to use relationship, which disables sorting of events.

So my question is: How would you create something like this?

I am using Drupal 7, Wiews 7.3 and latest version of Field Collection.

For better understanding of my problem, please look at following images (sorry, I can't post images because I'm new here):

Scheme

Mockup of view

share|improve this question

1 Answer 1

I would strongly suggest to move away from field collection implementation. Because, Sub - Events are actually events and should be nodes. Right now they are becoming values of a Single Event by using field collection.

Try considering Entity Reference. Add a reference field called Parent Event to the event content type and make it reference to same content type. Make the field optional so that you can create root Events.

In future, above architecture will provide you lot of advantages. Hope you like it!

share|improve this answer
    
Thanks for your suggestion, seems to be way to go, especially considering the Inline Entity Form module. –  milos.kroulik Oct 4 '12 at 15:21

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.