I want to contain my custom content type's image field (cck) within a block. I define the block within hook_block_view:
function foxyidx_block_view($delta)
{
$t = get_t();
if ( arg(0) == 'node' && is_numeric(arg(1)) ) {
$node = node_load(arg(1));
}
switch($delta)
{
case 'foxyidx_images':
$block['subject'] = '';
$render_out = drupal_render($node->field_image);
$block['content'] = <<<HTML
{$render_out}
HTML;
break;
If I were to render the image_field in a template I would use
print drupal_render($content['image_field']);
However, in the hook_block_view function I assume I need to use another function. Any ideas?