Adobe Dreamweaver CS3 Unleashed- P5: The good news is Dreamweaver provides numerous windows, panels, inspectors, and toolbars forstreamlining the way you build websites. The bad news, unfortunately, is that Dreamweaver providesnumerous windows, panels, inspectors, and toolbars for streamlining the way you build websites. Why somany windows, panels, and so on, Dreamweaver is unprecedented in the feature set it provides, allowingdevelopers complete control when building websites and applications....
Nội dung trích xuất từ tài liệu:
Adobe Dreamweaver CS3 Unleashed- P5 Broken Links— Broken links are hyperlinks that are not referenced properly. They generally will be linked to a file that does not exist in a particular directory or that in most cases is misreferenced. External Links— This report is a list of external path references within your site. Because Dreamweaver has no way of checking for external links, it will, at the very least, list them out so you can check them manually in one short concise list. Orphaned Files— Orphaned files are files that exist within folders in your site but that are not directly referenced by your web pages. Assets, for instance, will always appear within this list even when cloaked. Dreamweaver is providing a list so that later you can go into your site and perform a manual clean up of unused files.Before we demonstrate the process of checking links, lets actually create a broken link within our newsample.html page. You can do this by opening sample.html, placing your cursor on the page, and choosingInsert, Hyperlink. When the Hyperlink dialog appears, enter the value Fake Link within the Text text boxand then enter a broken path in the Link field, perhaps homepage.html. Remember, homepage.htmldoesnt actually exist. Were purposely creating a broken reference here to test the functionality. Click OKand save the page. Now were ready to check for bad links. Checking links within your site can beaccomplished using one of two methods. First, you can check the links for an individual file; and second, youcan check links for an entire defined site. Because the process for both is similar, Ill demonstrate the CheckLinks Sitewide feature for an entire site here. You can do this by following these steps:1. Within the Files panel, select the defined site, right-click (Control+click) to access the context menu, and choose Check Links, Entire Local Site. The Results panel will appear with the Link Checker tab highlighted, similar to Figure 3.34. Figure 3.34. Open the Link Checker by choosing Check Links, Entire Local Site. [View full size image] As you saw, the Check Links submenu also features the Selected Files/Folders option. If you didnt need to check the links for the entire site, you could highlight the files and/or folders and choose this option. Also, the path we took to open the Link Checker is merely one method. Like every other feature in Dreamweaver, the Check Links feature can be accessed using numerous methods: the Link Checker can also be accessed directly from the Site menu by choosing Check Links Sitewide. Alternatively, you can choose the Check Links Sitewide option from the Site submenu located within the Files panel Options menu.2. With the Link Checker tab open, youll notice a few options. First and foremost, in the top-left corner is the Show drop-down menu that offers the three available options for link checking reports (Broken Links, External Links, and Orphaned Files). Also, youll notice that the Link Checker tab is divided into two columns; the left side is where problematic files will be listed, and on the right is the link that is causing the problem.3. To fix the broken link, double-click the document on the left side of the pane within the Files column. This opens the document and highlights the problematic link. Within the Property inspector, change the link in the Link text field to something that you know is valid, such as index.html. Alternatively, you could click the troubled link on the right side of the dialog box within the Broken Links column. Here you can either type in the link manually or click the folder icon to search for the appropriate file. After the file is found, the correct path is added and the reference to the broken link disappears within the Link Checker menu.You can also check the external links within your site by choosing the External Link option from the Showmenu. As you can see from Figure 3.35, the Link Checker pane lists all the external link references, includingthe link to the public website as well as the mail link that we created in the previous chapter. Figure 3.35. Check the external link references within your site by choosing the External Links option from the Show menu. [View full size image]You can change the link references within this list, but they wont ever be removed. Dreamweaver willalways list all external links regardless of whether you know theyre correct or not.Finally, you can view orphaned files, files that are in your site but that arent linked to any pages, bychoosing the Orphaned Files option from the Show menu. As you can see from Figure ...