1

I have a preprocessor function in my model that runs on the views_view_table hook. I want it to be called only for a specific view. If it were a hook, rather than a preprocessor, I could use, for example views_view_table__myview. Can I do that with just the preprocessor, too, or do I have to register a matching hook? If so, how do I make sure it does exactly what the base hook does?

1
  • No hook is called view_table, so it's difficult to understand your question. Anyway, no Views hook is named after the views created, so you have to test the view object properties to know what view a hook is executing on.
    – Countzero
    Mar 28, 2012 at 7:26

1 Answer 1

0

For the Views module, if you want to know its template file suggestions:

  • Open edit for your view
  • Click on 'Theme information'
  • Use whichever template name that meets requirements
  • Go back to your view and, at the bottom of 'Theme information', click 'Rescan template files'
  • Your template file should be highlighted in this list

Not the answer you're looking for? Browse other questions tagged or ask your own question.