adjusting a "site stadard" header file
I was wondering how to get around this situation: I've got a header and footer file that get called by all my pages. The header file starts with and ends after the tag and the menu with a where the main content for each page begins. My question is how do I make adjustments to something in the header file for individual pages? For instance, lets say that I have one single page that I want to change the body background color, or just one page that needs something added to the section for a javascript, or some similar situation where I need to change just one part of the header file? Is there something I can do other than copying that whole header file into that one page to make the adjustment (because before you know it I'll have dozens of "exceptions to the rule" and then making a change to all would involve a lot of extra work.
If it helps, I'm writing my new site in html but on pages with a .php extention so I can use php if needed.
Thanks again.
(damn I wrote a lot for one simple question )
Suzanne posted this at 00:52 — 6th December 2002.
She has: 5,507 posts
Joined: Feb 2000
you can test for the page name or variable, and if ($pagename) { whatever} else {default} in the header.
In <? ?> of course.
Renegade posted this at 01:09 — 6th December 2002.
He has: 3,022 posts
Joined: Oct 2002
can u repeat the question? i odn't get it
Busy posted this at 04:41 — 6th December 2002.
He has: 6,151 posts
Joined: May 2001
Which ever way you do it you'll end up with added pages or added content, say you wanted to have 3 different background colors, you could use a CSS class: .bgcolor1 (background:???? .bgcolor2 (background:???? . bgcolor3(background:????? and put class="bgcolor?" into the body tag, using PHP would make it easier (add Suzanne's bit here) but still not perfect as could invlove any if statements and extra files or lines of code
In short there is no "easy" way to do it, not as easy as single header, footer sections
Renegade posted this at 09:28 — 6th December 2002.
He has: 3,022 posts
Joined: Oct 2002
ow, i'm slow, after reading it about 10000000000 times i understood it, yeah i agree, use suzannes method
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.