Home > Articles > Graphics & Web Design > Dreamweaver & Flash

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Changing Links

Moving files works much in the same way. If you need to move a file out of or into a different directory, be sure to do it in the Site window. Again, if documents are linked to the one you are moving, broken hyperlinks occur if Dreamweaver isn't aware of the change. If you move the file within the Site window, you will get the Update Files dialog box, just like in the previous exercise.

You can also easily change where links point to by using the change link command.

Change Links by Using the Change Link Command

To change a link by using the change link command, follow these steps:

  1. Highlight the file for the link you want to change.

  2. Select Site, Change Link to access the Select HTML File dialog box. You can also press Command+L (Mac) or Ctrl+L (Windows) to access the dialog box, or you can contextual click the icon and choose Change Link from the contextual menu.

  3. Locate the HTML file you want the old link to point to. When you're happy with your selection, click the Done button.

  4. After you choose the new file, the Update Files dialog box will appear, displaying all the files that need to be updated.

  5. If you want all the files to be updated, click Update. However, if you want only certain files to be updated, highlight the files by clicking them. When clicking more than one, be sure to hold down the Command key (Mac) or Control Key (Windows).

  6. If you don't want any of the files to be updated, choose Don't Update.

Change Link Sitewide

A very similar command to the Change Link command is the Change Link Sitewide command. With this command you essentially redirect all links from one page to another.

To use the change link sitewide command, follow these steps.

  1. In the Site window/panel, select the file that you want to change.

  2. Choose Site, Change Link Sitewide. You can also contextual click the icon and choose the Change Link Sitewide command from the contextual menu. This launches the Change Link Sitewide dialog box, as pictured in Figure 3.21.

Figure 3.21Figure 3.21 The Change Link Sitewide dialog box.

  1. You can also select the Change Link Sitewide command without a file select; however, the top text field in the dialog box will be empty, requiring you to fill it out. In the second text field (the one labeled Into Link To) either type in the path to the new file you want the link to point to, or click the folder icon at the end of the text field to search for a file. If you search for a file within your local root folder, the correct addressing will be added to the filename.

  2. When you're happy with the new file, click OK to bring up the Update Files dialog box. Refer to step 5 of the previous exercise for more information on how to handle this dialog box.

Deleting Links

Sometimes in Web site development, you may want to remove a link between different pages. You would accomplish this again in the Site window/panel. Because you want to change an attribute of a link, you want to make sure that Dreamweaver is fully aware of the situation, so it can make any necessary adjustments to other pages to preserve the link integrity of the Web site.

To remove or delete a link, highlight the file that you want to delete and either press the Delete key on your keyboard or choose Site, Remove Link, or contextual click and choose Remove Link from the contextual menu.

  • + Share This
  • 🔖 Save To Your Account