I have a problem that I have been working for hours now. Basically, I would like to place a block next to the comments div. So, in the footer of my page, I'd have all the user comments to the left and in the right side, I'd have my block. I know I have to do some realignment in the page.tpl.php, but I just can't get the comments div and the block div to appear side by side. Would appreciate any help on this.
Edit:
I added this in my template.php file:
/**
* Custom function to render a block to manually position it in the node.tpl.php markup
*/
function mytheme_block_render($module, $block_id) {
$block = block_load($module, $block_id);
$block_content = _block_render_blocks(array($block));
$build = _block_get_renderable_array($block_content);
$block_rendered = drupal_render($build);
return $block_rendered;
}
function mytheme_preprocess_node(&$vars) {
//Add the related_by_term block to the variables array so that we can render it in our node.tpl.php file
$vars['my_block'] = block_render('views', 'my_block-block_1');
}
And in my node.tpl.php, I added this after the comments section:
<?php print $my_block; ?>
But what I am getting is a memory limit exceeded error. Basically, the block_render function is causing some problem. It's this line that is causing the problem:
_block_render_blocks(array($block));
Any input would be highly appreciated. Spending hours on this issue. Thank you...