Defining a New Web Site
All Web sites have a root directory. The root of your Web site is the main directory that contains files and other directories. When you define a Web site, Dreamweaver considers that directory and all the files within it to be the entire "universe" of that particular Web site. If you attempt to insert an image from outside this universe, Dreamweaver will prompt you to save the file inside the Web site.
Dreamweaver isn't overly controlling! The program needs to define the internal realm of your Web site so that it knows how to reference other files. For instance, if an image is located in an images directory within the defined site, Dreamweaver knows how to properly reference the image within a Web page. If, however, the image is somewhere outside of the defined site, Dreamweaver can't reference it properly and you will end up with bad links in your Web site. You'll learn more about how Dreamweaver addresses files in Hour 4, "Setting Lots o' Links: Hyperlinks, URLs, Anchors and Mailto Links."
You'll define a new Web site for every project you create. Even if these projects are related, you may decide to break them down into smaller sites so the number of files isn't unwieldy. For instance, I create eLearning applications, courses that people can take over the Web. When I'm working on a project, I often break individual lessons of a course into separate defined sites. When I need to work on Lesson 1, I open that site, and when I need Lesson 2, I open it. You can have only a single site open in Dreamweaver at one time.
If you do not have any sites yet defined in Dreamweaver, you'll see a Define a Site link in the Site panel. Click on this link and you'll open the Site Definition dialog box. If you already have sites defined in Dreamweaver, you'll see a list of them in the Site panel. Click on the Site menu in the Site panel and select the New Site command.
The Site Definition dialog box, shown in Figure 3.1, has two tabs at the top: Basic and Advanced. Make sure you have the Basic tab selected. The Basic tab contains the Site Definition Wizard that walks you through the site definition. You can always go back and change or update your site if you need to.
Figure 3.1 The Basic tab of the Site Definition dialog box walks you through setting up a site definition.
The Site Definition Wizard has three main sections illustrated by the section names at the top of the wizard. These are
Editing FilesThis section helps you set up the local directory where you'll work on the Web site. You tell the wizard whether or not your site uses server-side technologies (the sites in this book do not).
Testing FilesThis section is needed only for sites that use server-side technologies.
Sharing FilesThis section enables you to tell Dreamweaver how you want to transfer files to a server or other central location to share. You'll explore this functionality in Hour 21, "Managing and Uploading Your Project."