Forum Moderators: mack

Message Too Old, No Replies

updating files in dreamweaver 8

         

xkxul

8:58 pm on Apr 20, 2006 (gmt 0)

10+ Year Member



Hi guys!
I`m a new member.I have just started to work on a website in dreamweaver and i got stucked. All my pages that i`ve created have a single and same menubar. Now i have modified the menubar with fireworks. Can u please tell me how can i update in the same time the menubar from all the pages? Now i have 62 pages and it is very hard to update each one separatetly.

Thx!

alce

11:44 pm on Apr 20, 2006 (gmt 0)

10+ Year Member



Hi xkxul.

Your best bet would be to make your page dynamic. While this approach involves learning some scripting language, it is totally worth it.

Basically what you would do is to create one file for your menu bar and then include that file in as many pages as wou want. You can use PHP for this purpose.

For example:

Create a new file in dreamweaver. File->New..
Then select dynamic page and then PHP.

On your recently created file type "this is an included file" and save it with the name my_file.php.

Crate another new file. File->New->Dynamic->PHP and save it as index.php

On this file type the following code:
<?php include "my_file.php"?>

Upload these 2 files to your webserver and open index.php with your browser.

You should see "This is an included page".

You can place the code
<?php include "my_file.php"?>
in as many different pages as you like and when you need to change the contents of the file my_file all your pages will display the updated content.

Note: for this example to work, you will need a hosting provider that supports php (most of them do) or to have apache and php installed on your computer. (If you are using a mac, they both come preinstalled)

hu12

1:09 am on Apr 21, 2006 (gmt 0)

10+ Year Member



if its just some code you want to change...

use the edit > "find and replace"

make sure to select

"find in" entire local site

"search" in source code

xkxul

5:15 am on Apr 21, 2006 (gmt 0)

10+ Year Member



I have tried to use find and replace. I have set entire local site and source code, then paste the code that i want to find but it only finds it in the index.html. That code i have it in over 62 pages.
What is wrong?

BeeDeeDubbleU

7:04 am on Apr 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It may now be too late but if you had created your blank page as a template with a common menu bar updating the other would only have taken seconds.

xkxul

5:45 pm on Apr 21, 2006 (gmt 0)

10+ Year Member



I have succeded to update with find and replace:D