Hi Heather, welcome to CAP!
Yes, there is a way to do this. I don't use Dreamweaver, but I do make use of "php includes" to accomplish what you're talking about.
Say you have a page with some code that looks like this:
Code:
Main Title
Welcome to my webpage!
Menu Item 1
Menu Item 2
Menu Item 3
Menu Item 4
Thanks for visiting.
You can cut out the menu items and save them into a separate ".php" file. Then you insert a line of php code where those menu items used to be, and this code "includes" the php file containing the menu code. You insert this code into all of your pages where you have that menu. Whenever you change the menu file, it is reflected on all of the pages.
So, going back to the above example, your php file could be called "menu.php" (or anything you want to call it), and it would contain the following code.
Code:
Menu Item 1
Menu Item 2
Menu Item 3
Menu Item 4
Now on your original page, you should have a blank space where you removed the menu items. Next, you need to insert the following code where the menu code used to be. This is the code that "includes" the menu.php file:
You need to have it exactly as it appears above -- note the spaces, semicolons, question marks, etc. It has to be precise or it won't work. The filename can be whatever you want it to be -- it doesn't have to be "menu," but it does need the .php extention.
After you've inserted the "php include," your new page with the new code would look like this:
Code:
Main Title
Welcome to my webpage!
Thanks for visiting.
One more thing -- your original page needs to be resaved with a .php extension for this to work. So if it was "page1.
html" you should resave it as "page1.
php".
I don't know if you will be able to see the your php includes in action with Dreamweaver. The only way I can know for sure if mine are working correctly is to upload everything to my server and view it online.
Good luck!