2

I have 2 content types named All Events and Event. Event as the name is self descriptive it represents an single event (programme). Whereas All Events contains additional data related to events, that is not part of any single event.

I need to have a relationship which says 'Featured Event'. And that relationship is going to be one-one. What would be the best way to select featured event among those events?

To organize this I can create a field collection field where each collection represents an event. And again selecting featured content would be question. Having a field in event to make it featured won't work, since 'one-one' wont be respected by the system and user need to take care of it.

  • What is your Drupal version? – hugronaphor Nov 3 '17 at 18:21
2

It's not too clear to me what you are asking but if you want to relate a content-type to another content-type you can use the Node reference from the References module.

You can include a field on your Event content type called Featured Event and relate it back to the All Events content type. Then limit the amount of values to one. Then when you create a node from the Event CT, you can relate it to whatever node you want from the All Events CT. Vice-versa you can create a relationship through the All Events nodes if you wanted to as well.

Then if you wanted you could use the Corresponding node references module to sync up node to node. This module will warn you if you have overloading references (more than 1:1 for a node) basically helping keep the integrity of the 1:1 relationship.

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.