logo

Get field value of reference node on node twig template Drupal 8 and 9

01
November

Get field value of reference node on node twig template Drupal 8 and 9
By: Anonymous | Published On: Mon, 11/01/2021 - 16:45

In following example field_course_ref is a field which reference with other node, field_course_type is a field of the reference content type which is a term so we get term name

{{ node.field_course_ref.entity.field_course_type.entity.name.value }}

Need Help ?