packedpluto Posted February 5, 2009 Share Posted February 5, 2009 Hi, I'm wondering what language you use to leave the Header, Footer, and Sidebars the same and only change the body when you click on something? I don't want to have to re-write all that info into every page. I'm sorry if this has already been answered before. I've noticed it mostly on blogs, but I think it's a commonly used method. Link to comment Share on other sites More sharing options...
jeffman Posted February 5, 2009 Share Posted February 5, 2009 Any server-side language that uses an "include" technique. Most of us use PHP for that. Link to comment Share on other sites More sharing options...
packedpluto Posted February 5, 2009 Author Share Posted February 5, 2009 I guess I'll have to finish the php tutorial. I had gotten half way through it, and hadn't figured out how to do it with that yet. Thanks for the speedy reply! Link to comment Share on other sites More sharing options...
Jerry62704 Posted February 6, 2009 Share Posted February 6, 2009 I guess I'll have to finish the php tutorial. I had gotten half way through it, and hadn't figured out how to do it with that yet. Thanks for the speedy reply!Do you know if your server has PHP? Most do. Here is the entire code you need to do an include:<?php include ("sys-config.php");?>In context it could look like this:<DOCTYPE....><html><head><title...></head><body><?php include ("your_heading.php"); include ("your_menu.php");?>stuff<?php include ("your_footer.php");?></body></html>You could have a side menu and you probably would include css and divs. Link to comment Share on other sites More sharing options...
Natechs Posted February 7, 2009 Share Posted February 7, 2009 Just a word of advice: if including files with PHP, always use .php endings and never .inc endings unless you know how to use Apache to block access to those files. People can come in and steal snippets with .inc endings. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.