I have a block that will show up in the specified region on the pages which it's specified to show.

However, can I use that same block in the body of a page? Is there a function call or a way that I can hook into the block api to display a block by name?

Comments

matt_harrold’s picture

This module makes it easy for non-programmers to insert a block into page content.

http://drupal.org/project/insert_block

pshafer’s picture

I am a programmer, so I would like to know how to do this both ways.

I will look at this module, since my client/eventual site administrator is not a programmer

matt_harrold’s picture

Seeing that you're comfortable with code ...

$block = module_invoke($module, 'block', 'view', $delta);
print $block['content'];

You can find out the module/delta by looking at the admin/build/block page. Hover over one of the "configure" links to find out the exact module and delta for the block you want to insert.

pshafer’s picture

Much Appreciated!

ahmedhanyfawzy’s picture

You can also use panels to display blocks and views in a pages as i did here on my site
http://www.nile7.com/services