I'm new to Drupal development and this question may have been asked and answered but I haven't found an answer that works for me yet.
I am developing a module that creates 4 paths using a menu_hook. Three of the pages appear inside an iframe defined on a page. I'd like to prevent the header/sidebars/footer (and other regions other than content) from appearing on the iframed page. This must be done independent of the theme - I don't know or care what the theme is.
I'd like the iframed page to only contain the content tags. I want to do this programmatically without the help of any additional modules. The iframed page executes a js script (on load) that redirects (the parent) to a results page. It is during the redirect that I can see the loaded iframed page and then the redirection occurs. The transition is ugly.
I have tried using templates in the module directory; however, I don't think I've done them correctly and haven't yet encountered a good example of a template loaded and used from a module directory.
I have tried a hook_page_alter function to unset the regions (but the header and footer still appear on the page).
I've tried a theme_hook function but I'm only interested in suppressing some of the regions the theme may be using and not interested in variables.
Because I don't know what the theme is and I don't know what the selector names or classes might be for the page divs I don't want to try and solve this with a few "display:none;" entries in a css file. Any help or ideas would be appreciated.