Creating a New Document


In the previous chapter, you learned that the Start Page is a handy window used to open new, existing, or recent documents. While the Start Page will work fine when Dreamweaver has been opened for the first time, it does us little good however, if we need to create a new document when document window instances are already open. In such cases, you'll want to use the New Document dialog. Accessible by selecting File, New, and shown in Figure 3.1, the New Document dialog allows you to create new documents based on an existing predefined skeleton file, create new documents based on a prebuilt template, and more.

Figure 3.1. The New Document dialog allows you to open new documents, new preconfigured documents, and ready made templates.


NOTE

You can also create a new document by right-clicking the defined site in the Files panel and selecting the New File option from the context menu, by clicking the Files panel's Options menu and selecting File, New File, by using the keyboard shortcut Ctrl+N (Windows users) or Option+N (Mac users), or by using the New File object in the Standard toolbar.


NOTE

All HTML pages require <html>, <head>, <body>, and <!doctype> tags. Because this is the case, Dreamweaver adds these tags to pages, also considered skeleton files, within the New Document dialog to help get you started.


As you can see from the callouts in Figure 3.1, the New Document window exposes the following features:

  • General tab: The default option when the New Document dialog is opened, the General tab includes options for selecting and opening various types of files.

  • Templates tab: Choose this option when templates have been created. Any defined templates within Dreamweaver will appear within this tab. Templates are covered with more detail in Chapter 15, "Working with Templates."

  • Category list: Includes all selectable page categories.

  • Page type list: Once a category has been selected from the Category list, the Page type list will display all skeleton files within the selected category.

  • Preview pane: When a preview is available, the preview pane displays a small thumbnail of the selected page type.

  • Description pane: When necessary, the Description pane outlines the features and benefits of the selected page type.

  • Document Type (DTD): The Document Type Definition menu allows you to pick from a pre-defined list of DTDs for your document. A DTD states what tags and attributes are used to describe content within an XML or HTML document, where each tag is allowed, and which tags can appear within other tags. Generally, these rules are outlined by the World Wide Web consortium (W3C). When you run the page validator available from the Check Page submenu in the File menu, the page is validated against the DTD you select here. Options within this list include None, HTML 4.01 Transitional, HTML 4.01 Strict, XHTML 1.0 Transitional, XHTML 1.0 Strict, XHTML 1.1, and XHTML Mobile 1.0.

  • Create Document/Template: Accessible when the Page Designs page type is selected, this option allows you to insert the page as either a single document or as a site-wide template.

  • Help: Launches Dreamweaver's Help window with the New Document dialog as the indexed selection.

  • Preferences: Launches the Preferences dialog with the New Document category selected. Use this option to change preferences for creating new documents. These options will be covered in Chapter 5, "Defining Preferences."

  • Get More Content: Launches the Macromedia Dreamweaver Exchange. Use this feature to search for more pre-built skeleton, page design, and template pages.

Of course the focal point of the New Document dialog lies in the categories and page types that are supported from the General tab. The categories and the supported page types are outlined here:

  • Basic Page: Includes skeleton files for creating new HTML, HTML Template, Library Item, XSLT, ActionScript, CSS, JavaScript, and XML pages.

  • Dynamic Page: Includes skeleton files for creating new dynamic pages such as ASP JavaScript, ASP VBScript, ASP.NET C#, ASP.NET VB, ColdFusion, ColdFusion Component, JSP, and PHP pages.

  • Template Page: Includes skeleton files for creating new dynamic template pages for ASP JavaScript, ASP VBScript, ASP.NET C#, ASP.NET VB, ColdFusion, HTML SSI template (Server-Side Include), HTML, JSP, and PHP.

  • Other: Includes skeleton files for creating new ActionScript Communications, ActionScript Remote, C#, EDML, Java, Text, TLD, VB, VBScript, and WML pages.

  • CSS Style Sheets: Includes a myriad of pre-built style sheets that you can use to add style and flare to your web pages. We'll cover this topic with more depth in Chapter 7, "Advanced Page Formatting Using Style Sheets."

  • Framesets: Includes a number of prebuilt frameset pages you can use. We'll cover this topic with more depth in Chapter 8, "Working with Frames and Framesets."

  • Page Designs (CSS): Have you lost that creative inspiration? Luckily for you, Dreamweaver includes a set of prebuilt, table-less page designs formatted entirely in CSS. Again, we'll cover this topic with more depth in Chapter 7, "Advanced Page Formatting Using Style Sheets."

  • Starter Pages: Tastefully designed, the Starter Pages category includes various web pages you can use to start an entertainment, health & nutrition, lodging, personal training, restaurant, spa, or travel site.

  • Page Designs: Similar to the CSS Page Designs category, this category features some basic commerce, data, text, image, and UI page designs. As you'll see in Chapter 15. "Working with Templates," all selectable page types can be inserted as either a simple page or a template by selecting the Template radio button just below the description window.

Now that you've gotten a thorough tour of the New Document dialog, let's use it to create a new HTML page that we can use throughout the chapter. To create a new HTML page, simply follow these steps:

1.

Choose the Basic Page option from the Category pane.

2.

Choose the HTML page type and click the Create button.The New Document dialog closes and a new HTML Document window instance appears similar to Figure 3.2.

Figure 3.2. A new document window instance can be created from the Basic Page, HTML category in the New Document dialog.


3.

Save your document (choose File, Save) to the folder that contains the examples for this chapter. I'll call mine index.htm.

NOTE

Most web hosting providers accept default files named index.htm, home.htm, or default.htm. Naming your starting page index.htm guarantees that you won't have to type http://www.yourdomain.com/mypage.htm but instead can limit the URL to http://www.yourdomain.com.





Macromedia Dreamweaver 8 Unleashed
Macromedia Dreamweaver 8 Unleashed
ISBN: 0672327600
EAN: 2147483647
Year: 2005
Pages: 237
Authors: Zak Ruvalcaba

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