Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By RayZheng on
hi,
We have a store entity type, and some new fields are added, such as Address, Phone# and etc.
We want to display those value on the page, instead of the format in {{ content }}, we need to access the value of store.addresss in node--store.html.twig.
However, we dump the variances available in this twig file, we cannot find any one related to message Address.
How can I access the value in node--store.html.twig? Will this need to done via some hooks?
Thanks,
Comments
One way:
One way:
Another ways you can find in this article: 'Getting Drupal 8 Field Values in Twig'.