From a module, I want to output "hello world" simply as a string as efficiently as possible when i call /mymodule/helloworld.
ofcourse, using hook_preprocess_html and hook_preprocess_page i can assign nearly empty templates. the html template should contain
<?php print $page; ?> and the page template
<?php print render($page['content']); ?>, and the content could be the string 'hello world'.
however, drupal will still go through all the processes of generating $css in html or
$page['sidebar_first'] in the page. Even if I override
template_process_html it seems
$variables['page']['page_top'] has already been populated.
How can I skip all the content processing and go straight for the output ?
[EDIT] had some usefull comments here, but still not what I want. I forgot to mention, I do want to use a template to print 'hello world'. So as I can override it in a theme, for example.
Yes, I can change the delivery callback (either in hook_menu or in hook_page_delivery_callback_alter), but what the callback method receives is a render array. I do want to use a node template to render the content as html. I'd have to write my own delivery callback, I guess
Yes, I can print out the html and call drupal_exit(), but then I wouldnt have the luxury of using a node template either
So, still looking.