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 computerbarry on
Hi all
Having a small issue trying to add a class onto an existing div wrapper outputted from the field_collection module.
<div class="field-collection-container">
<div class="field-name-job-photos">
<div class="field-items">
I would like to add a class onto:<div class="field-items">
So I have something like:<div class="field-items extra-class">
Can anybody help, how would I go about doing this?
Thanks, Barry
Comments
you can use theme_field()
you can use theme_field() function in template.php file on your custom theme
https://api.drupal.org/api/drupal/modules%21field%21field.module/functio...
Perfect! Thanks.
Perfect! Thanks.
I've used this approach in the past, been a while :)
I've created a tpl file and customised, if anybody interested:
Barry
The more you learn.... the more you learn there is more to learn.