Question

The grouping of field collections doesn't appear to be working correctly.

Fields:

  • Item
  • Sub-item
  • Sub-sub-item

Relationships:

  • Sub-item with Sub-sub-item

What's displaying:

With Delta 2:
1. Item 1
1.1
1.2
1.2.1
1.2.2

With Delta All
1. Item 1
1.1
1.2
1.1.1
1. Item 1
1.1
1.2
1.2.1
1.2.2

It appears it doesn't know that 1.1.1 belongs under 1.1. Can it be since t was typed in after everything else was? Without the relationship the sub-sub-item doesn't appear.

Thanks

Was it helpful?

Solution

I figured it out.

Very simple. In the view (field collection view) clone have:
1. The first collection item
2. The second collection item (whole collection)
No relationships are necessary

Field Collection setup:
1. In the second collection item show the third collection item through field collection items in the display.
2. In the third level make sure the necessary fields are showing.

Styling:
The third level won't be styled so will have to style this is what I did:

.field-collection-container {
 border-bottom: 0px solid #D3D7D9; /*changed to 0 */
 margin-bottom: 0.5em; /*changed from 0*/
 }

.field-collection-view {
padding: 0.5em 0 0.3em 0; /*was 1em 0 0 0.3em 0*/
margin: 0 0 0 1em;
border-bottom: 0px dotted #D3D7D9; /*changed to 0*/
}

.field-collection-container .field-items .field-items .field-item {
margin-bottom: -1em; /*changed from 0*/
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top