Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I hope to get some help cause i spent to many days searching …
So,
- got a content type : Record (fields : title, explanation)
- Got another content type : Concert (fields : title, "title of the Record"- so it's like a foreign field, date)
I want to display for the Concert content type : Title, date, "tittle" from Record", and "explanation" from Record.
Can't find how to do this …
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedHi !
You shouldn’t use a free (?) text field as a foreign key to another node for many reasons (performance, maintainability etc.).
You should use a node reference field in your Concert content type. Therefore, in the template, you get the nid to a Record content type node that you can easily retrieve via node_load($nid).
Comment #2
amogiz CreditAttribution: amogiz commentedThanx Zigazou.
I managed using node_load and it works fine :)
Thax for the tip !