Click to See Complete Forum and Search --> : Edit once instead for each page


xmus
02-28-2009, 09:30 PM
Hi all,

I am new to web programing.
At this time I am trying to write code in xhtml and css.
It's a two column design. Navigation links on the left, content on the right.

I am writing more pages than I originally intended and now for each new page, I have to update the code for the navigation (add a link) in all the other pages.

My question - how can I manage the code for the navigation menu in just one place ?
If I need to use PHP or some other technology, I would appreciate a pointer.

Many thanks.

tracknut
02-28-2009, 09:42 PM
You're looking for "Server Side Includes" or SSI. You put the navigation code in one file, and just include it in each of those other pages. Do a search on SSI and you'll find a ton of references - PHP is one good way to do it.

Dave

Major Payne
03-01-2009, 11:59 AM
Easy to read SSI Info (http://en.wikipedia.org/wiki/Server_Side_Includes).

SSI - Server Side Includes (http://websitetips.com/ssi/)
Apache Tutorial: Introduction to Server Side Includes (http://httpd.apache.org/docs/2.0/howto/ssi.html)
Apache Server Side Includes (http://www.ssi-developer.net/ssi/)
Server Side Includes: A Mini-Tutorial (http://www.arachna.com/edu/tutorials/mini/ssi/index.html)

HTHs,

Charles
03-01-2009, 02:19 PM
PHP is the better way to go, but if you are using XHTML than you have two other options. XSLT and external entities.