Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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

share|improve this question
add comment (requires an account with 50 reputation)

1 Answer

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.

share|improve this answer
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 – kewal Mar 7 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 at 13:24
add comment (requires an account with 50 reputation)

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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