Add new comment
When writing custom drupal modules, I often want to include a blurb on the page about how to do a particular task on the page.
The content of the blurb may change, too, as requirements change for the client.
Rather than hardcoding the text, making the client dependent on me for changes, I put the content into a node. In the custom module (e.g. the code I'm writing), I load the node and use the body of the node as the content to display.
$node = node_load(array('nid' => '11363'));
if (isset($node->body)) {
$o .= $node->body;
}
This has two requirements: the node exists, and the node has HTML included for formatting. Neither is typically a problem with the clients I have, but be sure to watch for the possibility the user is expecting filters to format the content before display.