Still trying to get this field handler working. Not hooking views_data_alter with the correct $data index. When I used $data[field_data_field_test] [entity_id] [field] [handler] the options form part worked (options listed, etc.), but the render function was receiving the entity value and not the field data. What is the correct reference? Jeff
Soooo frustrated! The only portions of the array for this field (a generic field added to a content type) that have handlers are for filter and argument ,not field, aside from the entity_id section, which I've tried already. I tried $data[field_data_field_test][field_test_value] section, because it seemed a logical place, and tried using [field][handler] within it, thinking that it would get created, but no. I have found a handful of modules that use the hook, and handful of blogs online, but every one seems to be for a different situation than simply wanting to override the field (not filter or argument) handler for a content type field. On 10/27/2010 06:40 PM, jeff@ayendesigns.com wrote:
Still trying to get this field handler working. Not hooking views_data_alter with the correct $data index.
When I used
$data[field_data_field_test] [entity_id] [field] [handler]
the options form part worked (options listed, etc.), but the render function was receiving the entity value and not the field data.
What is the correct reference?
Jeff
Just in case anyone is still reading this thread, I'm going to attack my issue from a slightly different direction. When I look at the D6 version of CCK, in its views.inc file, it creates a field with three main content sections: myfield[field], myfield[filter] and myfield[argument] This makes total sense to me, given that 3 of the 4 places a field is used in the views UI are as a field, argument or filter. There's also reference, but that's a bit different. My issue is that when I have hook_views_data_alter(&$data), the $data array has my field as myfield[table], myfield[filter] and myfield[argument] ---- no [field] section to be seen...or altered. Sooo... I wonder momentarily if the [field] section needs to be created, rather than altered. But then I wonder why that would be...why it would not have a [field] section to start, and I remember that if I do nothing with this field at all, it does display in the view when selected as a field, and then I go for a walk with the dog. Jeff
participants (1)
-
jeff@ayendesigns.com