0

using entity reference, i am able to relate to nodes with one another. Thats great. The user while entering their blog has an option to relate it to nodes of my custom content type. This works great. Now i want that once the user has selected the node to be related to, the blog should not only show the title of the n node but also other fields from that referenced node. How can i achieve this?

Regards

1

On the content type that has the reference-field, on the "Manage Display" section, you can choose if you want "Label" or "Rendered entity", which will output the full node.

  • hey thanks a lot...just to add on..in the referenced node i have many fields, is it possible to just get a few fields only and let say trim the length and get the image and say just one more field and ignoring the others...i hope you understand my use case...if not just tell me i will try to be more clear – why Mar 7 '13 at 12:04
  • I understand your doubt! You can set display to 'hidden' . The referenced node will still be loaded, and you can access its variables and print them as you wish. If you want more detail, just use <?php print_r($node); ?> on your node template , and work from there. – noitib Mar 7 '13 at 13:24

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.