1

How to nest Field Collections in Drupal 8?

I have Field Collection installed and working fine. What I want to achieve is that for example, I'll have a box on the front end which may contain 6 tabs of content, or two boxes each containing 3 tabs.

First part is working: I have a 'tabs' Field Collection with which I can 'add another item' (tab).

For the second option I need a 'box' Field Collection that contains nothing but the 'tabs' Field Collection.

4
  • 1
    IMO sounds like a problem better suited for Paragraphs.
    – Kevin
    Commented Dec 11, 2017 at 13:46
  • Thanks - Kevin, I'll look at that as well, had seen a few posts about theming nested Field Collections though, so assumed it was possible, couldn't find anything on how to actually do it though...
    – iain-g
    Commented Dec 11, 2017 at 13:50
  • 1
    I wouldn't bet on it @iain-g, The D8 release only made it as far as alpha and it's basically been abandoned (no updates for more than 18 months now). The project page even states Paragraphs is likely to replace field collection for Drupal 8. Field collection is on its way to being deprecated. It is recommended to use paragraphs instead of field collection for Drupal 8 projects.
    – Clive
    Commented Dec 11, 2017 at 13:55
  • OK - Thanks both of you, I'll go and check out Paragraphs.
    – iain-g
    Commented Dec 11, 2017 at 14:05

1 Answer 1

0

Using the Field collection module in Drupal 8 seems to NOT be a good idea anymore. It currently only has an alfa1 release from April 2016). Instead you may want to try to use Paragraphs instead, as suggested also on the Field collection project page, i.e.:

Paragraphs is likely to replace field collection for Drupal 8. Field collection is on its way to being deprecated. It is recommended to use paragraphs instead of field collection for Drupal 8 projects.

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.