Restructuring Existing Site Elements


In the first phase of structuring a sitemaking new folders where neededDreamweaver's file-management features are a great convenience. It's easiest to use Dreamweaver for file organization chores within any defined site. In the second phase, moving existing pages and folders into the new folders, it's essential that Dreamweaver be used to maintain the proper links.

One of Dreamweaver's most powerful features is its capability to maintain links. Whenever a page is moved or renamed, Dreamweaver scans the entire site to locate any links pointing to the altered page. A list of these links is then presented to the user with an option to update the pages and correct the links. In almost all circumstances, you'll want Dreamweaver to update the links. If the links are not adjusted, your site could potentially be littered with broken links, which is a very slow and tedious problem to fix manually.

The example site is, at this stage, a mix of old and new. To bring the site structure together, you'll need to move some files related to press relations from the root to their new home: the pr folder. As part of that process, you'll rename files to make the content more accessible.

1.

In the Files panel, expand the site root, if necessary. Drag the file named pr_index.htm from the root level into the pr folder. When the Update Files dialog box opens, take a moment to scroll through the file list to see how many files are affected; when you're done, choose Update. Dreamweaver displays a progress bar as the links are modified. Also from the site root, drag pr_06302004.htm into the releases subfolder of the pr folder. Again, choose Update when the Update Files dialog box is presented.

Dreamweaver doesn't just offer to adjust links when you move files; it also monitors the renaming of files. In the next step, you'll adjust the filename for one of the items just moved, pr_index.htm, to index.htm. This adjustment will allow site visitors to enter just the pr folder address (that is, http://www.bountygeneral.com/pr/) and see that folder's home page.

2.

Expand the pr folder, if needed, and click twice on pr_index.htmbe sure not to double-click. Rename the file to index.htm. You can also right-click (Ctrl-click) the file and choose Rename from the shortcut menu. Dreamweaver again presents the Update Files dialog box; select Update to change links in all the listed pages.

The real power of Dreamweaver's capability to maintain links becomes evident when you move multiple files or even whole folders. Dreamweaver can even handle moved or renamed folders with numerous subfolders. In the sample site, you'll want to first consolidate the nutrition folder by moving it in with the other departments under the depts folder. Then, to demonstrate that folders can be moved in any direction, you'll relocate the hr folder from depts into the site root. The under lying thinking here is that the Contribute role of department manager shouldn't have access to the human resources area.

3.

From the site root, drag the nutrition folder into the depts folder and drop it there; choose Update from the Update Files dialog box. Folders with a significant number of files and/or subfolders will take a bit longer to process. Next, drag the hr folder out from depts and into the site root, again choosing Update when the Update Files dialog box appears.

Note

Earlier, I mentioned that you should opt to update the affected links in almost all circumstancesso when would you choose Don't Update? One such circumstance is when you're copying the file or folder to the same relative location (for example, one folder off the site root) and you want to reuse the files with a different name while keeping the original links intact.




Design and Deploy Websites with Macromedia Dreamweaver MX 2004 and Contribute 3(c) Training from the Source
Design and Deploy Websites with Macromedia Dreamweaver MX 2004 and Contribute 3: Training from the Source
ISBN: 032128884X
EAN: 2147483647
Year: 2006
Pages: 130
Authors: Joseph Lowery

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net