6.7 Cleaning Up a SiteDreamweaver can check for broken links and orphaned files on a file-by-file basis or for the entire site. It also warns you about external links, which can be verified manually or using the External Link Checker extension discussed in Chapter 22. To check your complete site for broken links, use Site Check Links Sitewide, Ctrl+F8 (Windows), or Cmd+F8 (Macintosh). This opens the Link Checker dialog box, shown in Figure 6-15, giving you a list of the Broken Links, External Links, and Orphaned Files that were found within the site. Figure 6-15. The Link Checker dialog boxThe broken links that occur when developing a site can be repaired easily from this dialog box.
6.7.1 Broken LinksBroken links are links that point to a file that can't be found. To display broken links, select Broken Links from the Show drop-down list in the Link Checker dialog box. Double-clicking a filename in the files list opens that document, which helps determine exactly which link is broken. To fix a broken link, select the bad URL from the Broken Link column in the Link Checker dialog box. You can hand-edit the link or browse to a new file using the folder icon that appears next to it. (If you can't see the folder icon, widen the column by dragging the vertical line that separates the columns.) After fixing a broken link, press the Tab key or the Enter Key (Windows) or Return key (Macintosh) to proceed to the next link. Dreamweaver asks you whether it should update the link everywhere it was used within your site. If you answer No, Dreamweaver corrects only the single bad link. If you answer Yes, Dreamweaver attempts to automatically update occurrences of the bad link throughout your site. If File Check In/Check Out is enabled, it attempts to check out files before performing the update and check them back in afterwards.
6.7.2 Searching for Orphaned FilesOrphaned files are those files that are not used anywhere within the site; they may link to other files, but no other files link to them (i.e., there are no incoming links to this file). To display orphaned files, select Orphaned Files from the Show drop-down list in the Link Checker dialog box. There is no automated way to remedy orphaned files. For each orphaned file you may opt to manually:
If you synchronize all files on a site, Dreamweaver will upload orphaned files as well, so it is best to remove them from your local site folder before synchronization. 6.7.3 Checking External LinksExternal links are links that refer to resources outside your web site, including other web sites, such as http://www.amazon.com, and email links, such as mailto:wish-dreamweaver@macromedia.com. To see a list of external links (including email links), select External Links from the Show drop-down list in the Link Checker dialog box. Links that begin with the address specified in the HTTP Address field (under the Local Info category in the Site Definition dialog box) are considered local links. By default, Dreamweaver doesn't verify external links. You have a number of options for verifying external links:
|