Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal Custom CCK field with multiple child fields

Is there a way of creating a composite field that can have multiple values, with each value having another group of composite values?

E.g. we want to have this structure at the end:

  • Group 1 (unlimited number of groups)
    • Child field (unlimited children for each group)
    • Child field
    • ...
  • Group 2
    • Child field
    • Child field
    • ...
  • ...

Is this possible at all for a custom module that defines a CCK field? If so, can someone push me in the right direction?

like image 315
Karl Avatar asked Dec 18 '22 05:12

Karl


1 Answers

this is a very know and debated issue in the drupal world.

this feature is called cck "multigroup" and it looks it's pretty difficult to implement. there are a lot of posts in the drupal forum about this, i suggest you to start here:

http://drupal.org/node/494100

it's a kind of "hidden" feature in the cck module. looking in the module directory, you will find instructions here:

cck/modules/content_multigroup/README.txt
Edit: Ongoing work on the multigroup module has moved to the experimental CCK 3.0 branch.

in the meantime you can try to deal with it using the flexifield module (but it's kinda hackish, i won't use it in production)

like image 130
gpilotino Avatar answered Jan 12 '23 07:01

gpilotino