Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.8
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2009 at 22:42 UTC
Updated:
5 Jul 2010 at 22:10 UTC
Can anyone give me some help on updating this code for Views 1 for a field handler for an image field? Here's the Views 1 code:
function audio_views_handler_field_image($fieldinfo, $fielddata, $value, $data) {
$node = node_load($data->nid);
if ($node->audio_images) {
return l(theme('audio_image', audio_images_get($node->audio_images)), 'node/'. $node->nid , NULL, NULL, NULL, FALSE, TRUE);
}
}
Any help would be greatly appreciated. Thanks.
Comments
Comment #1
dawehneryou would need a hook_views_data(_alter) to add(change) the handler of your field.
Then use hook_views_handlers to define your handler and then you would have to write the handler.
You need to override the render method.
I suggest you to read views advanced help. This is covered quite well there.