I've defined a block that returns a string of HTML as follows:
function product_block_view($delta = '')
{
switch ($delta) {
case 'groups_images':
$block['subject'] = t('Category Images in Groups');
$block['content'] = "<div>Group images html</div>";
break;
case 'singles_images':
$block['subject'] = t('Category Images as Singles');
$block['content'] = "<div>Single images html</div>";
break;
default:
break;
}
return $block;
}
This block lives in a custom region named 'myregion'
. I am attempting to render this block's view with <?php render($page['myregion']) ?>
but nothing comes through. The dump of $page['myregion']
looks something like this:
array (size=4)
'product_groups_images' =>
array (size=5)
'#markup' => string '<div>Groups images html</div>' (length=29)
'#contextual_links' =>
array (size=1)
'block' =>
array (size=2)
0 => string 'admin/structure/block/manage' (length=28)
1 =>
array (size=2)
...
'#block' =>
object(stdClass)[116]
public 'bid' => string '77' (length=2)
public 'module' => string 'product' (length=7)
public 'delta' => string 'groups_images' (length=13)
public 'theme' => string 'id' (length=2)
public 'status' => string '1' (length=1)
public 'weight' => string '0' (length=1)
public 'region' => string 'findyourflavor' (length=14)
public 'custom' => string '0' (length=1)
public 'visibility' => string '1' (length=1)
public 'pages' => string '<front>' (length=7)
public 'title' => string '' (length=0)
public 'cache' => string '1' (length=1)
public 'subject' => string 'Category Images in Groups' (length=25)
'#weight' => int 1
'#theme_wrappers' =>
array (size=1)
0 => string 'block' (length=5)
'#sorted' => boolean true
'#theme_wrappers' =>
array (size=1)
0 => string 'region' (length=6)
'#region' => string 'findyourflavor' (length=14)
Any idea what I'm doing wrong that is causing my div to not be rendered by the render
function?