3

I've already found this question, but it doesn't really help me out, maybe I just don't understand it (I've got the latest version of the module). How to integrate Field collection module in Views?

I have my own content type called "Gallery", for this, I created a field-collection which consists of an image and caption. Now I try to create my own view, first one, only to show the thumbs, and then one, showing the big image and the caption.

But how can I access only one field of the field-collection? I can find this field:
Content: Gallery and caption
or this one: Content: Gallery and caption:delta (Gallery and caption (field_gallery_and_caption:delta))

but how do I access only the image field? and which type of display should I select?

1

I've recently done this before. It's really easy, you can create a Node type view. Then you just add the field collection field that's attached to your node as a Relationship, in your case "Content: Gallery and caption".

Then after you've added the relationship, when you click "Add" on the fields, your field collection fields will be available to select. Their names will start with "Field collection item: *".

If you're using Node reference field inside your field collection then you need to add one more relationship. See this issue and #2 comment for solution.

0

Did you add the field_collection relationship to the view?

You will need the relationship to access collections as individual fields.

  • For this i have to select the view-type Field collection item, right? Because trying to generate a view of type content, i don't get this relationship. But how to connect the the repeating field_collection fields to the unique fields of my gallery (like title, tags for the gallery...). Thanks! – sinini Oct 16 '12 at 18:47
0

To add to the answer, when you add the FieldCollection as a relationship, you choose the FieldCollection's name from the list of relationships. I had thought I was looking for something saying "field_collection" and couldn't find any reference to "collection".

Once I realized that I just had to pick my FieldCollection by name it all worked as described. I lost many hours chasing that tiny distinction. Hope this helps someone else like me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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