I have a custom module in Drupal that outputs a serialized dump of data. I want this page where the dump appears to not use the active theme. Instead, I just want the data dump to appear without any HTML markup, theme, JS, CSS, etc. Just the dump (another web site will be consuming it).
If I was doing this at the theme level I would simply create a new page.tpl.php file for a specific content type to appear without any theming, HTML, etc. But I need to do this at the module level for just this one page that the module creates as this module will be installed on different Drupal sites.
Is there a way to disable all theming and control the HTML wrapping output of a module page at the module level? All I really want to do is “turn it off”, if this is even possible.
I’m running Drupal 6.
Well it’s a different approach, but one that always worked for me.
When your page callback is called in the module, instead of returning the data (which will theme it), just print or echo the data and do not return on the function.