Forum Moderators: open
first, the site i am building is going to be a single layout, with numerous pages.
the header/footer will be the same throughout the site, so i would like to have the ability to edit the header/footer without having to go through each and every page and manually changing what i have to change.
is there a way to be able to alter the header/footer without having to do this? can i do this through css or some other means. how could i go about this?
thank you!
Create your core page framework as index.php without any content.
Then, by using URLS such as:
www.mydomain.com/index.php/section1/
www.mydomain.com/index.php/section2/
use your scripting language to parse out whatever falls after index.php (i.e.: section1) and have a single 'include' statement to pull that file into the page content area.
That way, the index.php page is the only page used throughout the site so changes to that show throughout.
It's late, I;m new here, and very tired, so I might not have explained that too well. Will return in morning to see if that sounds like a solution and expand on it if it is!
Here is the best of code you put on the site.
<script language="JavaScript" src="footer.js"></script>
Here is the file you save as footer.js.
document.write('<a href="legal.htm">Read Me</a></br>');
document.write('Whatever footer crap you want');