0

I'm using taxonomy and nodes to create a tree structure. Inside the taxonomy term I created an Entity Reference (referencing to nodes). I know this looks like the world upside-down, but for this time this was the easiest way.

Term1 (reference to:) - Node A, Node B, Node C, Node D
Term2 (reference to:) - Node B, Node D, Node E

I want to add custom fields to the node, but with different values for each reference. Let's say I want to add a date field with different values for each reference. Adding a custom field to the content type won't work, because they will be the same for all references.

1
  • I solve this by adding custom table. Think there are no solutions in Drupal for this cases.
    – FriOne
    Nov 25, 2014 at 19:50

1 Answer 1

1

The Entity Reference module does not support this. You'll want to check out the Relation module. With this module the reference (relation) itself is a fieldable entity.

I do realize you'll have to write an update function to migrate your current references to relations, but aside from creating a custom table as @FriOne suggested, it's the only way to go as far as I know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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