PDA

View Full Version : External data?



Khepri
25 Oct 2007, 07:45 AM
I'm building a site for my partner at the mo which will probably wind up with quite a lot of pages, and as a result of its dynamic (as in 'constantly updated', rather than 'animated') nature, things like the menu setup may well need to be altered along the line as things are added that hadn't been previously considered.

The menu currently has a fairly simple setup, based on a list in the HTML, with CSS styling to deal with things like colours and rollover effects. And I (and she) would like it to stay that simple. But I am concerned about having to change it later. Is there a way of providing a link within a menu div that imports the menu list from an external HTML file?

alvo
25 Oct 2007, 11:31 AM
Server Side Includes (SSI) or PHP Includes. They both allow you to put markers in the HTML code that the server replaces with external data when the page is sent to the user. SSI requires the server to be set up to do it (usually is) and usually requires a .shtml extension on the HTML file so that it will know to parse the file. PHP Includes requires PHP be running on the server (usually is) and a .php extension on the HTML file. Do a Google search for Server Side Includes or PHP Includes to get the proper form of the marker tags.