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.

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

  • This worked for me. I created a relationship for the field collection first, then created another relationship with the individual field collection field. – Web Assistant May 2 '14 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. – sumanchalki Jul 1 '15 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, privacy policy and cookie policy

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