Posted by amogiz on October 22, 2011 at 11:52pm
2 followers
Jump to:
| Project: | Content Templates (Contemplate) |
| Version: | 7.x-1.0-rc3 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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
#1
Hi !
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).
#2
Thanx Zigazou.
I managed using node_load and it works fine :)
Thax for the tip !