Mell 0

What I want to do is make my roll-over menu to be as a separate file so when I make any changes to it, it automatically updates the other pages without me having to update every single page individually. Any ideas on how to do that? Many thanks!!

1 answer

This was chosen as the best answer

If you're using Apache as your web server you could use server side includes:

Alternatively use a server side programming language to 'include' the menu in every page served.

brief intro to PHP include():

Answered about 9 years ago by Tony Crockford
  • GREAT!! But does that mean I have to make all my other pages saved as .php? Mell about 9 years ago
  • If that's what it takes for your server to run them through the PHP parser, you might be able to get the server to treat .html files as PHP: If your hosting account allows for .htaccess (web server configuration) files, it's possible to tell the web server to run PHP in other sorts of pages. To do this, create a new file at the top level of your website and call it htaccess.txt (we'll rename it shortly). Put the following lines into the file: AddType application/x-httpd-php .php .htm .html You can add any file extensions you'd like to treat as PHP. (Don't add other server-side scripting languages like .asp unless you know what you're doing!) Once you've done that, rename your file to .htaccess - that's starting with a dot and no file extension. This is a hidden file, so depending on your software settings, it may then appear to vanish. Most web editing software has a setting to show hidden files. The files with the extensions you listed should now be run as PHP Tony Crockford about 9 years ago
  • p.s. I copied that .htaccess instruction from the Perch CMS help pages - Perch is a brilliant CMS: Tony Crockford about 9 years ago
  • Thank you so much for your help, really great :-) Mell about 9 years ago