Written version of the tutorial:
I have created a simple website in order to demonstrate searching and replacing content in multiple files.
The website contains 4 pages, and we want to make a change that affects each one of them.
Let’s begin by opening the files we want to change in Dreamweaver.
I want to add content below the h2 tag, so I’ll make a selection in that area. Notice how I’m only selecting the closing h2 tag, since the actual text inside that heading is different on each page and thus wouldn’t produce a match. So we need to think carefully what kind of selection will result in a match on every page and in the right section of that page.
I’ll copy my selection and then go ahead and open the search and replace window. Here I need to make sure that “open documents” is selected so Dreamweaver will search through all the open files.
The upper area is for the text to be matched.
The lower area defines how we want to replace the matched text. I’ll go down to the lower area and paste in the copied code. Then I’ll add a div tag and some content.
Next we can check that our search is actually producing matches. Dreamweaver shows us that there is matching content on all open pages. Now we’ll make the replacement by hitting the replace button.
Finally let’s remember to save all our files.
Making a quick preview shows us that all our pages include the new content. This can come in really handy if you need to make changes to a large site with tens of files.
Thanks for watching and see you next time!