Saving Your Work
If you're creating more than just an afternoon's entertainment, you'll want to save the work you do to the Web pages you make.
To save the current page:
Figure 3.43 Type a filename for your Web page in the File name text box, then click on Save to save it. Dreamweaver MX will prompt you to save your file within the currently open local site.
Figure 3.44 The Mac view of the Save As dialog box.
Make sure you select the correct folder in which you want to store the file. Dream-weaver will automatically prompt you to save the folder within your currently open local site, if you've defined one (see Chapter 2), but do double-check the folder you're saving in so you can find your file again.
Type a name for your file in the File name text box. The name should not include any spaces, but you can use underscores (as in main_page.html).
Click Save. The dialog box will close, and you'll return to the Document window.
You can also click the Save button on the Standard toolbar (Figure 3.45).
Figure 3.45 Click the Save button on the Standard toolbar.
You'll see an asterisk in the title bar (Figure 3.46) if your page has been changed since you last saved it.
Figure 3.46 The asterisk after the file name in the title bar indicates I've made changes since I last saved the page.
To save all open files:
From the Document window menu bar, select File > Save All.
All the named files that have been changed since the last time you saved will be saved now.
A Save As dialog box will appear for any open files that have not been named and saved. Save any files you need to save.
Dial the Right Extension
By default, PCs will save HTML files with the .htm extension, and Macs will save them with the .html extension. If you want to use a different extension, you need to change a setting in one of Dreamweaver's configuration files. (In previous versions of Dreamweaver, you could do this in the Preferences dialog boxnow you need to open a file, which isn't hard, but is less convenient.)
To change the default extension for HTML files, open the XML file that defines the document types. You can open this in Dreamweaver or in a text editor. The file's location is as follows:
Windows: C:\Program Files\Macromedia\Dreamweaver MX\Configuration\DocumentTypes\ MMDocumentTypes.xml
Mac: Macintosh HD:Applications: Macromedia Dreamweaver MX: Configuration: DocumentTypes: MMDocumentTypes.xml
Near the top of the file, you'll see the following code:
<documenttype id="HTML" internaltype="HTML" winfileextension= "htm,html,shtml,shtm,stm,lasso,xhtml" macfileextension="html,htm,shtml, shtm,lasso,xhtml" file="Default.html" writebyteordermark="false">
Where it says winfileextension and macfileextension, the first item listed is the default file type. To change Windows, list .htm first instead of .html first, so it would look like this:
Save the file, and quit and restart Dreamweaver. You may get some error messages about file types; just click OK and double-check the result in the Preferences dialog box.
To set a default extension other than .htm or .html, just change the preferences. From the Document window menu bar, select Edit > Preferences, and select the New Document category. From the Default Document Type menu bar, select your document type, whether it's ASP.NET, PHP, or ActionScript. The Default Extension text box will show the extension Dreamweaver will add when saving the file. To change this, follow the instructions for changing the default extension for HTML, above.
You'll need to specify any exceptions to this extension by typing the full filename, such as dork.html, when you save a file.
The two most common extensions are .html and .htm. Why use one over the other? I prefer .html. The extension .htm is a throwback to when many PCs (as opposed to Macs or Unix machines) could only read eight-letter filenames with three-letter extensions. Now that that's no longer true, I prefer to standardize with .html.