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 Imaaxa-Cory on
I am trying to add a class name to a template field. The new class name will be constructed from the content name + other text.
Trying to get the content name from element['#object']['values']['info']['x-default']. Always comes up NULL. Using {{kint()}} to display the values on the screen.
I do not know how to access protected fields with twig, and my searches on drupal.org and google.com are not finding anything.