I have inherited a drupal site with a few modules. They're not exactly written according to best practices... they return html code instead of renderable arrays. In other words, they do this:
function custommodule(){
$output = '<p> Some output. </p> <p> Some more output. </p>';
return $output;
}
Instead of this:
function custommodule(){
$args = array( arg1, arg2 );
return theme('sometheme', $args);
}
The output is supposed to be displayed in the content region. However, since plain html is returned that is not wrapped in a node or anything like that, the output gets scattered all over my page... for example, the text Some output.
appears above the navigation, Some more output.
appears underneath the footer, etc.
By the way, the page-array has the returned markup (the $output
from above) in this place:
page['content']['system_main']['main']['#markup']
Whereas for example a typical article would have its #markup in
page['content']['system_main']['nodes'][$nid]['body'][0]['#markup']
So I guess drupal doesn't realize I would like my output to be in the content region?
Is there any way I can safely render that unpleasant html?
Thanks a lot in advance!!