I have a taxonomy term called Event type. Inside that term I have a Color field. I want to pass the HEX value of the Color field as a variable in Twig.
The taxonomy term variable in Twig (on node level) looks something like this
{{ content.field_event_type }}
So in order to access the field that exists inside that term, I would need something like this
{{ content.field_event_type.field_color_field.value }}
But I can't seem to make it work.
How do I do this? Thank you.
content
fornode
and addentity
:{{ node.field_event_type.entity.field_color_field.value }}
.