On my site I use Views and Display Suite, sometimes together, sometimes separately.
In on of my Display Suite layouts, I have a certain field displayed and the field itself is modified by a function
theme_preprocess_field(&$variables)
Using Display Suite, it works fine. Now on another page on my site, I am trying to display the same field using a Views page view. The field is specified in the view, but the preprocess function is not being called.
Do you think it has to do with the fact that I have this in a custom module file:
/**
* Implements hook_views_api().
*
* Enabling using templates inside module
*/
function mycustom_views_api() {
return array(
'api' => 3,
'path' => drupal_get_path('module', 'NAME'),
'template path' => drupal_get_path('module', 'NAME'),
);
}
I am trying to avoid putting any custom files in my theme folder because it doesn't make sense (what if I want to change themes?). So I need a way for all my custom stuff to work as a module.
Thanks