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.
Hello,
I have created a file with filename: views-view-fields.vars.php and put it in sites/all/themes/bootstrap/templates/views/ folder. Inside the file I added the function bootstrap_preprocess_views_view_fields() and cleaned up several times the cache but the function is never called.
I don't know what I am doing wrong.
Comments
Comment #2
markhalliwellThe theme hook is
views_view_field
(not "fields").Also, you shouldn't be modifying any contrib project as your changes will be blown away if/when its updated. This why creating sub-themes is important.
Comment #3
chrbak CreditAttribution: chrbak commentedHello @markcarver and thanks for your replay.
Just for clarification I am talking about the theme hook function template_preprocess_views_view_fields(&$vars).
So I just followed the same way as the template_preprocess_views_view_table(&$vars) is already been used by the bootstrap theme inside the "bootstrap\templates\views\" folder.