I want to render a custom block I created within a .tpl.php file so that I can further style it.

I tried using this:

<?php

$block = module_invoke('block', 'contact_info', '1');

print render($block['content']);

?>

in the file:

block--block/contact-info.tpl.php

but it does not render my block.

the machine name of my block is:

contact_info

I have no idea what the '1' is as I cannot see anywhere in the Custom block Manage/Edit area that lists any numbers.

 

Comments

UPDATE:

This allowed me to print / render the block in my tpl.php page:

<?php

$block = module_invoke('block', 'block_view', 'contact_info');

print render($block['content']);

?>

 

In this instance my custom block's machine name was:

contact_info