In researching this, I gather that there used to be a theme('header') function, back in 4.x, that did what I need, and its been removed - but for the old timers, it sounds like that's the functionality I'm after.
I have an old, php coded, form on my website which is outside of the drupal document space. For consistency of "look & feel", and of course maintainability, I'd like to be able to generate the visible page header from drupal (rather than copy & paste the HTML thereof). This is a hard topic to research because of the ambiguity of the term "header"... I want the visible banner, not any HTTP headers or the theme's "header" block, which appears below the banner portion. I'm after the DIV with id="header", containing the icon, site name & mission, etc.
It looks like there ought to be a way to use theme_page() or theme_block(), but I have not had any luck.
If there's not an off the shelf solution, I'd appreciate pointers & tips about how best to proceed to code this myself, not being experienced at all with the drupal api. I've figured out how to include the BOOTSTRAP.INC to twiddle drupal from outside, but not much further.
My apologies if this is a FAQ... I have spent quite a bit of time investigating before posting...
Thanks in advance,
MikeM
Comments
I think it really depends on
I think it really depends on the theme you're using. It sounds like you'll likely want to go to your themes page.tpl.php and copy/paste the relevant html & php. I can't think of a cleaner way to do it unless you theme has already moved the "header" code into a separate included file (in which case you'd simply require_once() it).
- Ryan
You can use
You can use drupal_http_request api for this purpose
http://api.drupal.org/api/function/drupal_http_request/6
drupal_http_request will return the complete page content save to variable then by using php string functions you can get header html code.
Khurram Fraz
MikeM, I need to do the same
MikeM, I need to do the same thing. Did you find a solution?
The other replies don't seem to be helpful.