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

dawehner’s picture

Status: Active » Fixed

you 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.