Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.0-rc10
Component:
General
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2008 at 23:01 UTC
Updated:
11 Nov 2008 at 01:31 UTC
I can't find any documentation on what 'views data' operation do in hook_field_settings(). Is it the same as 'views' operation in Drupal 5?
Thanks.
Comments
Comment #1
ztyx commentedOh, crap. I meant filters not
views.Comment #2
yched commentedIt's rather an equivalent of the D5 hook_field_settings($op = 'tables'). The other views-related ops ('filters', 'arguments') are gone.
It lets your field type specify how the field's data should be exposed to Views.
If your field doesn't implement the hook, the result of content_views_field_views_data() (defined in include/views/content.views.inc) will be used.
I'd suggest not implementing the 'views data' op, see how your fields get exposed to views using those 'sensible defaults', and then, only if needed, implement the op to adjust to your field type's specific needs.
In such case, it can be useful to have your implementation of hook_field_settings('views data') call content_views_field_views_data() and start from there to fine tune what you get, rather than starting from scratch. See how nodereference does this, for instance.
Obviously, this will require some acquaintance with Views, Views API and handlers, and hook_views_data()
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.