designsbytammy Posted June 2, 2005 Share Posted June 2, 2005 Is it possible to prevent the header area from redrawing everytime the main area changes (ex. click on a category, the header redraws)? It seems to me that the header should not need to reload when the content area changes. My header area has been customized and the image is spliced into a table (see www.designsbytammy.com/store). Any suggestions would be appreciated. I'm just learning all of this so if you have a solution I would appreciate as much detail as you have time to provide. Thanks, Tammy Link to comment Share on other sites More sharing options...
♥Vger Posted June 2, 2005 Share Posted June 2, 2005 Don't know if this will work, but you can try it. Instead of: <?php require(DIR_WS_INCLUDES . 'header.php'); ?> try: <?php require_once(DIR_WS_INCLUDES . 'header.php'); ?> This should work (if placed in index.php) for all those pages that work off cPaths in index.php, but there would be no point in using it (for instance) for the individual pages in the Information box. Vger Link to comment Share on other sites More sharing options...
designsbytammy Posted June 2, 2005 Author Share Posted June 2, 2005 Instead of: <?php require(DIR_WS_INCLUDES . 'header.php'); ?> try: <?php require_once(DIR_WS_INCLUDES . 'header.php'); ?> ================= Tried this and it had no effect. Any other suggestions? Tammy Link to comment Share on other sites More sharing options...
♥Vger Posted June 3, 2005 Share Posted June 3, 2005 I did try that out on a test site on the index.php page and it worked for all cPath pages loading into index.php. On the test site I have quite a complicated javascript setup in the header which delays loading just enough so its noticeable, and it didn't reload when I moved to different cPaths on the index.php page - else I would have seen the delay. If It's not working for you, then you could try include_once instead of require_once Vger Link to comment Share on other sites More sharing options...
designsbytammy Posted June 3, 2005 Author Share Posted June 3, 2005 If It's not working for you, then you could try include_once instead of require_once =============== I tried this too and it still redraws. Boy this is frustrating. Does it matter that in my header.php the header is defined as a table and the search box is in the table? Tammy Link to comment Share on other sites More sharing options...
♥Vger Posted June 3, 2005 Share Posted June 3, 2005 The table and search box in the header makes no difference - I have both of those on the test site. I think you need a real expert in php for this one - I'm certainly out of ideas. Vger Link to comment Share on other sites More sharing options...
designsbytammy Posted June 3, 2005 Author Share Posted June 3, 2005 Dear Vger, I went through my code and the only thing I can think of is that my breadcrumbs are also in the header and since the breadcrumbs change every time a category is clicked perhaps that is forcing a recall on the entire header table. If I can figure out how to back the breadcrumbs out I will try that. Thank you so much for your suggestions. If you think of anything else, please let me know. Tammy Link to comment Share on other sites More sharing options...
♥Vger Posted June 3, 2005 Share Posted June 3, 2005 Set up a copy of the header, call it header2.php, and remove the call to the breadcrumb trail from it, and 'include' this in the index.php page instead of header.php I do this on quite a few websites where the owner does not want the 'Home' link on the homepage (I can see their point). Vger Link to comment Share on other sites More sharing options...
designsbytammy Posted June 3, 2005 Author Share Posted June 3, 2005 Vger, Before I tried you last suggestion I had someone else look at the site and they said that the header didn't redraw for them. So I figured it must be something in my settings or on my computer. I cleared out my temp files and cookies which must have been massive because it took almost 4 minutes. I went back to my site and the header doesn't redraw and the screen loads instantly. So your suggestion of 'include_once' or 'require_once' must have done the trick. Thanks so much for your help!!!!!!! Tammy Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.