I'd like to add a custom attribute into the title element whenever a particular content type is displayed, whether as an individual node or through a view (specifically when displaying 'full content'). How do I do this?
I'm using Drupal 7.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
You could modify the field.tpl like monymirza suggested. But you may want to use
hook_preprocess_field(&$vars) and target the title element within the
Use that function in your theme and you may view the content/structure of the
$vars array with
dsm($vars) from the devel module.