[support] Views Handler Help - Please

Michael Prasuhn mike at mikeyp.net
Tue Jun 5 17:02:29 UTC 2012


Your hook_views_handlers implementation is missing a few details:

1) It's missing the info => path key which tells views where to find the files that contain your handlers so that it can load them when required.

2) It's missing the parent option that tells views which other classes you're handler depends on so that those files can be loaded form disk as well (in your case it should list views_handler_field as the parent, since that is what your handler class extends).

3) This shouldn't matter much, but it is convention to place the hook_views_handlers in the same MYMODULE_views.inc file as your hook_views_data() and hook_views_data_alter().

There is a good example of how a Views 2.x style hook_views_handlers() implementation should look at http://drupalcode.org/project/views.git/blob/refs/heads/6.x-2.x:/modules/node.views.inc#l653.

-Mike
__________________
Michael Prasuhn
503.512.0822 office
http://mikeyp.net



More information about the support mailing list