Click to See Complete Forum and Search --> : Jump menus
mecjj02
09-27-2007, 10:45 AM
I am managing a 500+ page site in DW using templates. Included in the template is a jump menu that frequently changes (multiple times a weeks). Needless to say, every time the menu is modified, it takes a while to update and FTP all 500 pages.
So my question is, is there a way to create a jump menu as an include file? Ideally, I like to edit and maintain one file that all 500 pages reference, without having to continuously update the entire site.
Any suggestions? Is this even doable? Thank you so much for any help you can provide.
Christie
TJ111
09-27-2007, 10:51 AM
You should use server-side includes with whatever server-side language is on your server. Dreamweaver has a project manager, so once create a seperate file for the menu, just use the find->replace tool on your whole project to replace the menu code with the include code.
mecjj02
09-27-2007, 10:53 AM
Thank you for your quick response!
To clarify, if I create the include with the server-side language, do I need to change all the page extensions? Right now the pages are all .htm
TJ111
09-27-2007, 11:07 AM
No, you just have to make sure that .htm pages are parsed by the server. Since you have a 500+ page site, I'm assuming you have it hosted on its own server or VPS (or some hosting that gives you access to at least .htaccess). ASSUMING you use Apache/PHP you can add the following either in the httpd.conf or in the site's root .htaccess file:
AddType application/x-httpd-php .htm
This will make all .htm files be able to be parsed on the server before being sent to the browser.
mecjj02
09-27-2007, 11:45 AM
Ah, ok that's very helpful. I'll definitely give that a try.
So once I modify the .htaccess file, I should be able to create .php includes without changing the page extension, right?
TJ111
10-01-2007, 09:32 AM
Exactly. Once you set .htm is parsed by the server, you could include any php in the pages that you want, just make sure it's enclosed properly <?php ... ?>. A good way to test it would be make a test page like test.htm with only php code on it, and see if the server executes it.
test.htm:
<?php
echo "This page is PHP only, if you can read it, it's being parsed by the server.";
?>