Managing Documents


After you have created a Dreamweaver site, you're ready to begin adding pages to your site, editing their content, and (when necessary) deleting or renaming them. For the most part, Dreamweaver follows the same methods of managing documents as most of the popular word processors.

Creating a New Document

Creating a new document in Dreamweaver can be done in a variety of ways. When you open Dreamweaver, the welcome page (shown in Figure 23.12) offers you a quick way to create pages in some of the most popular formats with a single click.

Figure 23.12. The Dreamweaver welcome screen provides you with links to create a variety of new documents.


If you have disabled the welcome screen, you can create a new document by choosing File, New from the menu bar. In the New Document dialog box, shown in Figure 23.13, you can choose from the entire range of document platforms that Dreamweaver supports.

Figure 23.13. The New Document dialog box enables you to choose your page type.


A third method of creating a new file is to click the menu button in the Files panel and choose File, New File. Rather than opening a new file, Dreamweaver simply adds a new untitled file to the list of pages in your site (as shown in Figure 23.14) using the default extension for the page (in this case .cfm). You can then open the file by double-clicking on it.

Figure 23.14. A new document is added to the Files panel with the default extension.


Saving Files

Whenever you modify a page, you'll want to save the file. Dreamweaver enables you to save a file by choosing File, Save or File, Save As and selecting the appropriate location.

If you have multiple pages open in the Design view, you can also right-click on the page title tab and choose Save, Save As, or Save All to save all the active, unsaved documents.

Tips for Saving Data

File management is easy, but it can also be risky. You can overwrite files, lose data, and save files to the wrong area of your computer. You also can run the risk of saving files improperly. Dreamweaver's management tools help you a great deal with this, but it's still a good idea to adhere to the following guidelines for general saving and file management:

  • Save your work regularly Whenever you begin a new file, immediately name it properly and save it to the correct location in your directory structure.

  • Be careful when using existing pages as templates If you want to create a new page based on an existing page with the Save As command, be sure that you save the new document with a new filename before making changes. Otherwise, you risk unintentionally editing the existing document and saving over its content.

  • Back up your work Whether you make a copy of the file to floppy disk, Zip disk, or CD doesn't matterjust make sure you keep a copy! Few things feel worse than losing your hard work with no chance of recovering it.

  • Create your directory structure first and then save files to that area Use Dreamweaver's Site Definitions dialog box to ensure you set up your directory structure before trying to manage a project. This way you'll know where your files are as you set up a logical structure upon which to form the linking of pages and page assets within a given document. Although Dreamweaver tracks changes in the locations of documents and site assets and can make some adjustments automatically, it's a very good idea for you to understand the structure of your site as well as any possible adverse effects that might result if you move files around.

Another problem with file management has to do with saving files to the wrong format. Let's say you're in Fireworks MX and want to save a file as a JPEG, but you mistakenly select another format. If you give the file an incorrect extension, the program saves the file improperly.

This problem holds true when saving HTML, XHTML, and Cascading Style Sheets (CSS) files and related documents. It's important to remember that HTML, XHTML, and CSS are saved in ASCII, or text, format. If you save a file as a binary file or transfer it as a binary file, the file becomes corrupt. The same is true with binary formats: You can't save or transfer a GIF or JPEG file in ASCII, for example, because you will destroy the file's integrity.


Deleting, Duplicating, and Renaming Documents

As you are developing your site or reworking an existing site, you'll find it necessary at times to duplicate a document to create a new document with similar content, rename an existing document, or delete documents that you no longer need. To do this, simply (Control-click) [right-click] the document in the Files window, choose the Edit submenu, and select the option to fit your needs (see Figure 23.15).

Figure 23.15. With the Site window open and a file selected, you can access a context menu with a variety of options, including Delete, Duplicate, and Rename.


To delete a file, select the Delete option from the context menu. A pop-up window asks whether you really want to delete the selected file. Click OK. The file is now deleted.

Caution

Be sure to always double check your files before you delete them. It's frustrating to accidentally delete the fruits of your labor just because you didn't open the file and check it first.


Note

When managing the documents in your site, consider archiving files rather than deleting them. A corollary to Murphy's Law states that any time you delete a document, it's likely you'll need a block of code from it later. If you archive instead of delete, you maintain a copy that you can use down the road.


Duplicating files is particularly handy when you want to use most of the information in a given page but modify some content. You can duplicate the page you want, make modifications to the copy, and then rename the copy.

To duplicate a file, highlight the file to be duplicated in the Site panel. Then bring up the context menu and select Edit, Duplicate. A copy of the file immediately appears with the words copy of in front of the original filename.

To rename a file, bring up the context menu, select Rename, and enter the new name for the file.

Caution

When renaming files, be sure to provide the proper file extension. If you rename a file with a different extension (or without one altogether), the file opens improperly or does not open at all.


Opening an Existing Document

To open an existing document located on your hard drive, begin by selecting File, Open. The Open dialog box appears. Browse for your file, highlight the file you want to open, and then click the Open button.

The file now opens and is available for your modifications.

You can also open documents from the Site panel by simply double-clicking the document you want to open.

Note

Files open in the view in which you're working. So, if you're in Design view, the file opens in Design view.


Using Design Notes to Track Changes to a Document

As you work, you'll occasionally find that you want to jot down information about the pages with which you're working to remember later or to tell a co-worker about. Dreamweaver provides a handy tool called Design Notes that enables you to make notes for a page and save them to a separate file. You can also attach Design Notes to objects such as Flash files or applets, and you can use Design Notes in other programs such as Fireworks. Here, the focus is on attaching a Design Note to a new or an existing document. To add a Design Note to your page, be sure to save your page; then choose File, Design Notes from the menu bar.

Note

You must save your page before you can add any Design Notes to it.


In the Design Notes dialog box, shown in Figure 23.16, choose a status and type the corresponding note. If you want the note to be displayed whenever the file is opened, check the appropriate check box. If you choose not to check the box, each team member has to review the notes manually.

Figure 23.16. The Design Notes dialog box enables you to add notes to your pages to track changes or convey other information.


The file's status can be marked as follows:

  • Draft

  • Revision 1

  • Revision 2

  • Revision 3

  • Alpha

  • Beta

  • Final

  • Needs Attention

If you want the date to appear with your Design Note, click the Date icon above the Notes text box and Dreamweaver inserts a datestamp. You can also use the All Info tab within the Design Notes dialog box to add name and value pairs to the notes. So if you want to show that the author of the document is Harry, you can do so by clicking the plus symbol in the All Info tab and adding the name of author and the value of Harry (see Figure 23.17).

Figure 23.17. The All Info tab enables you to add your own custom matched pairs to the Design Note.


When you click OK, the Design Note is saved with the page.

You can view and edit your Design Note at any time by selecting File, Design Notes. When the Design Note appears, make modifications by using the Basic and All Info tabs. For example, if you want to remove a name-value pair entry, highlight it in the All Info tab and click the minus symbol.



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

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