There used to be a module that did this, but I forget what it's called, and am unsure as to its compatibility with various versions of Drupal. The easiest and most direct way to place the contents of a block in a page are using the following PHP snippet:
<?php
$block = module_invoke('menu', 'block', 'view', 26);
print $block['content'];
?>
In this particular example, we're displaying a menu block with ID 26 inside a page. Here's how you use this code snippet to insert any block (this example uses Drupal 5.x; for other Drupal versions, the process should be similar):
This will reveal the following address line (in this example we are using a custom block with ID 26)
/admin/build/block/configure/block/26
the last two variables are the ones we're interested in: /block/26
If we wanted to place this custom block into a page, we would simply substitute these values into our PHP code snippet (which we place in a node (page or other content type)) as follows:
<?php
$block = module_invoke('block', 'block', 'view', 26);
print $block['content'];
?>
Notice that the middle two terms ('block', 'view') always stay the same. You're simply updating the first and last term.
Voila 
For the reverse method, displaying a node (such as a page) in a block, we recommend you use the node as block module.
All Content © 2005 - 2008 Contract Web Development, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Powered by Drupal
buenisimo!!!!!!!!!!!!!!!!!!
buenisimo!!!!!!!!!!!!!!!!!!
gracias
Placing a webform into another node - Possible?
I would like to place a webform form which is a node into a page/node. Is the code very similar to placing a block in a node?
Thanks
Rory
Webform description
Hi Rory,
I'm pretty sure it's possible, but you might be better off simply inserting what you had in the other node in the description field of the webform - it will take any input format, so you should be able to put just about anything in there.
Thanks for the code.
Thanks for the code.
The first example does not work, because the word "menu" is there, when it should be "block".
Inserting Drupal Block vs. Menu
I probably should have made that more clear. The first example is for inserting a menu into a node, the second for inserting a block.
This is so simple, isnt there a module for this ...
i mean come on ...
Making a Drupal module
It is simple. If you want this installed as a module, why don't you learn how to create the module? Most Drupal developers are bogged down getting core functionality improved. This could be a good starting point for you to contribute to Drupal.
Number on drupal blocks in view?
Some of the blocks do not have a number on them. I made a view, but it didn't give it a number... I'm confused...