Click to See Complete Forum and Search --> : [RESOLVED] Site Maintenance Question


jennyb
01-11-2007, 07:43 AM
Hi,
I'm a software developer but I'm new to client side web development. I am developing a small web site with only static content for my sports club. The site is pure html/css. My problem is that every time I want to change my nav bar or banner I need to edit every html file in the site. I have read other posts that suggest the use of SSI as a way around this.

Could someone tell me what professional web developers would do in this case. Is it acceptable to have to edit each and every file in order to add an item to the navigation bar for example, or should I use SSI/PHP so that the change can be made in only one place?

thanks

Brooksie155
01-11-2007, 08:09 AM
Not sure about SSI but with PHP you can do this easily. Create a file called navigation.html, then copy the code for this part of the site into it, then in it's place in you pages put the line:

<?php include("navigation.html"); ?>

Basically this will insert the contents of navigation.html in to your page at the position you have called it.

Personally I would probably do something like:

<?php include("header.php"); ?>

Main body

<?php include("footer.php"); ?>

Where the header contains everything from the first <html> tag, down the end of the navigaiton, and the footer contains all the required clossing tags.

jennyb
01-11-2007, 08:29 AM
Thanks Brooksie
Another question if you don't mind - I rarely see .php or .shtml extensions being used on commercial websites. Is this because the web server is configured to check all html files for PHP/SSI?
Are PHP and SSI in widespread usage?
Thanks a lot

ray326
01-11-2007, 09:11 AM
I rarely see .php or .shtml extensions being used on commercial websites.Whoa. Then you're not paying much attention. There are huge numbers of commerical PHP sites. As far as .shtml, the server can be set to parse all .htm and .html pages, too. If your server supports it then SSI will be easier to use because it's much more limited.

jennyb
01-11-2007, 09:16 AM
great, thanks for your help, I think I'll use SSI