The question is split in two: printing values from one level reference. And printing value from second level reference. And how to do both in twig template and how to do both in admin UI?

First questions in detail: How can I print the value of a field from a referenced entity in the related node twig template or via admin UI in Drupal 8? For example: In a twig template file from a node type article referencing a node type event, where the event node type has a date field and the date from the referenced node type event its date field should be printed in the article node twig template? And what if I would like to make this theme indendent. How to solve this in field admin UI? Is this possible? Similar questions on DA have answers not working for me or outdated (< Drupal v8.4).

From there the second question arises: Is it possible to go one step further? What about a referenced node type called "userprofile" referenced to from a user account who is author of the node? What if I would like to print the image from this "userprofile" node type in the a node twig template or field admin UI of the node where the user is author of?

Questions close to this question but didn't worked for me or didn't helped me to find my answer:

  • You need to share your relevant code what have you tried so far.
    – kenorb
    Dec 5, 2017 at 14:36


Browse other questions tagged or ask your own question.