I've created a block and put some php in it to display the body of a node using the code form here: http://drupal.org/node/300910#comment-4183142
<?php //get the ID from the URL $node_id = basename($_SERVER['REQUEST_URI']); echo $node_id; //Load the node object. $node = node_load($node_id); //Get the node array into memory. node_view($node); //Now you can parse only the body value into a variable. $node_content = $node->content['body']['#value']; //Printing content. echo $node_content; ?>
The page I've tried this on prints the ID in the block (as expected) but not the body of the node with that ID.
My hunch is that
$node_content = $node->content['body']['#value']; can't be used in a block.
Any thoughts? Thanks!