4

I am using Field Collection Views in Drupal and everything works fine, except Sorting. I am able to rearrange the Field Collection items in Edit form using both drag-and-drop also manually using Row weights option.

I would like the the Field Collection View results to be sorted by this Row weight, could you please guide how I could acheive this.

2 Answers 2

3

This could be achieved by creating a relationship, and using Delta to sort. Let us say that the field collection field's name in the entity is field_slides.

Create a relationship with 'Field collection item: Entity with the Slides (field_slides)'. Check the box for - Require this relationship

2
  • This worked for me. I created a relationship for the field collection first, then created another relationship with the individual field collection field. Commented May 2, 2014 at 16:05
  • +1, after creating the relationship, it does the magic. I did not need to add the sort criteria. Adding sort criteria shows duplicate record for me as delta for that field collection field is different for a same record. Commented Jul 1, 2015 at 7:04
0

Found a very easy workaround via DraggableViews module and it works just fine.. the step-by-step instructions could be found here..

Custom Sort Drupal Content with the Draggable Views Module

Thanks to the Author - Kronda Adair. :-)

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.