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.
<?php print $node->field_test[$node->language][0]['value']; ?>
I have a selection list (Key|Label) and I am trying to display the label instead of the key. The above code and everything else I can think to try only display the key. How do I print the label?
Thank you.
Comments
Comment #1
hampshire CreditAttribution: hampshire commentedI still have not been able to figure this out and can think of nowhere else to search. I assume everyone must be doing this as the key often has little value in a template. What replaced ['view'] in Drupal 7?
Thanks.