By Sealer on
Hi, all. Could anybody tell what is the most appropriate way to append some content to a "nodeless" page? For example, when a module uses the drupal_get_form() function as a page callback to display some form, no $node object is usually created. Instead, the form output is immediately embedded into the page content and is drawn as is.
The only way I see is implementation of the hook_preprocess_page() function in my own module. Something like that:
function MODULE_preprocess_page(&$vars) {
// ...
$vars['content'] .= '<div>some code goes here</div>';
}
In other words, some piece of code is appended directly to the $content variable of the page.tpl.php template. Is there another way to achieve such a purpose properly?
Comments
You can create new region in
You can create new region in proper place of your page and then show block with your custom content in this region.