0

I want to create custom content type (parent) which consists of other custom content types (children). Is this feasible in Drupal 8? Or I should do it programmatically?

Example: I want to have custom content type called Task, and another custom content type called Subtask. When a user creates a task, the user has to complete some fields (id, name), and should then create some Subtasks which are children of this Task. For the subtask some fields are to be completed also. In the end, each task will have some data such as:

  • name = "task_one".
  • description = "this task should do ..".
  • subtasks = {"subtask_one","subtask_two"}.

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

0

For Drupal 8, it sounds like you are describing reference fields. You would want to:

  1. Create your two content types
  2. Add a reference field to one of them. The refence field would be of the type 'content'.
  3. (Optional, but probably) Limit the types of content that can be referenced to only the other content type.

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.