• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 4. Creating a New Web Site Defin... > Defining Your eLearning Web Site

Defining Your eLearning Web Site

What is a Web site? A Web site is a group of related Web pages that includes a beginning page called the home page. You will call an entire online learning course one Web site and create a new site definition for each course you create. You can also divide an online learning course into several Web sites, each representing a logical division of the Web site (such as a lesson). A single Web site shares templates, images, scripts, and other files.

Your site definition describes an important location for your course: the site root directory. The site root is important because it’s the home for all the files and subdirectories in the Web site. This location doesn’t necessarily correspond with the site root on your Web server. For example, your server’s site root might contain all your courses, with a separate directory for each course. You are working on a single course, which is in a directory under the courses directory, as shown in Figure 4.1. The directory called wwwroot (the default site root directory name for a Microsoft IIS server) is the site root, but you would define your local site as one of the directories in the courses directory under the site root.

Figure 4.1. The site you are working on can be a directory in the site root of your Web server.

It can be difficult to decide the directory level to use as a local site definition. Some of the factors to consider include

  • Shared images— You don’t want too many duplicate images in multiple sites. Web sites that use many of the same images may be grouped into a single site.

  • Too many files— Every time you modify a link or insert an image, Dreamweaver updates the site cache. This process can become very slow when there are too many files in a site.

  • Shared templates and library items— You’ll explore templates and library items in Chapter 7, “Building Reusable Templates and Library Items.” Templates and library items are shared within a Web site in Dreamweaver, so you’ll want to group lessons or courses that use the same ones. You might need to duplicate these files over several sites.

Creating Your Web Site with the Wizard

In preparation for the online learning application you’ll build throughout this book, define a new Web site to house the files you will create. In this chapter, you’ll define your local site. The local site contains your working files, the ones you are changing and editing. The local site is usually located on your local hard drive but may also reside on a network drive that holds your personal work.

Defining the Web site is always the first step in a new Dreamweaver project. You will define a site for each project you work on in Dreamweaver and make sure you’ve selected that site (more about that in a bit) before you change any Web pages within the site. Dreamweaver enables you to define many attributes of a Web site, such as the local site, the remote site, how you will transfer the local files to the remote site, and the application server language you will use (for dynamic Web sites). You don’t need to define all these attributes at once, because you can always edit your site definition.

To begin defining your site, select the New Site command from the Site menu, shown in Figure 4.2. The Site Definition dialog box appears. In Dreamweaver MX, the Site Definition dialog box has two tabs at the top: Basic and Advanced. Select the Basic tab to use the Site Definition Wizard to set up your site. I’m not usually enthusiastic about wizards, but this wizard makes setting up a site quick and logical.

Figure 4.2. Select the New Site command from the Site menu to open the Site Definition dialog box.

The Site Definition Wizard (the Basic tab of the Site Definition dialog box), shown in Figure 4.3, leads you through three sections, listed in the dark blue bar at the top of the dialog box: Editing Files, Testing Files, and Sharing Files. In this chapter, you’ll fill in the Editing Files section. The Testing Files section is used when Dreamweaver MX will produce dynamic Web pages based on server languages such as ASP, JSP, PHP, or CFML. You’ll learn how to set up a site to create dynamic Web pages in Chapter 13, “Creating and Tracking a Dynamic Web site.” The final section of the wizard, the Sharing Files section, configures how you’ll share and upload files to the remote site. This functionality is covered in Chapter 16.

Figure 4.3. The Basic tab of the Site Definition dialog box leads you through the three sections to create a site definition.

Power User Tip

Mac users will notice that they have many more commands in the Site menu than shown in Figure 4.2. There are some interface differences concerning site definitions between the Windows and the Mac versions of Dreamweaver MX. You’ll learn more about this later in the chapter when you explore the Site window.

To create your Web site definition with the Site Definition Wizard, follow these steps:

On the first page of the Editing Files section, name your site eLearning Site. Dreamweaver uses this name to display the current site in a list of sites. Because this name is used only within Dreamweaver, you don’t need to worry about using spaces or punctuation here. You’ll want to use a site name that is short but meaningful, a name that enables you to select the proper site from a list that may contain many sites. Click the Next button.

The Editing Files, Part 2 page of the wizard asks if your site will use a server language. Select No because you will be creating regular Web pages in the first sections of this book. If you select Yes, you will have additional choices enabling Dreamweaver MX to set up a dynamic Web site. Click the Next button.

The Editing Files, Part 3 page of the wizard asks you to locate your local site. You can edit files either on your local machine or on a server. I strongly suggest you edit Web files on your local hard drive because it speeds up access and isn’t subject to server problems. Select the top radio button next to Edit Copies on My Machine, Then Upload to Server when Ready (Recommended). Enter the path to the local site, shown in Figure 4.4, by clicking the folder icon next to the Local Root Folder field. Create an empty directory on your hard drive as your local site. Click the Next button.

Figure 4.4. Enter the path of the location where you’ll store your local copy of the site.

The Site Definition Wizard skips the Testing Files section and takes you to the Sharing Files section. You’ll set up sharing in Chapter 16, so select None from the drop-down menu as shown in Figure 4.5. Click the Next button.

Figure 4.5. You can select None for the server connection, and then set up the transfer method you’ll use later.

The last page of the Site Definition Wizard displays a summary of the site definition, as shown in Figure 4.6. Your summary should show that you set up the Local Info, including the site name and location. Click the Done button to complete the site definition process.

Figure 4.6. Double-check that the summary information for the site is correct.

Q: “I would prefer to define my local site as the directory on the network that I share with my team. Why should I create a directory on my hard drive?

A: When you come into your office in the morning, open up a Web page in Dreamweaver, and begin working on it, how do you know that someone else on your team isn’t working on the same file? What if you overwrite the changes a team member made earlier in the morning? In Chapter 16, you’ll learn how to use Dreamweaver’s check in/out system, which will guard against this problem happening. You’ll see that it isn’t any extra work at all after you get used to working this way.

Importing an Existing Site

Instead of creating a Web site from scratch, you might be updating an existing site in Dreamweaver. There isn’t an actual import command in Dreamweaver because Dreamweaver edits and creates standard HTML files. To import a site into Dreamweaver, you simply create a site definition.

Begin importing an existing site by defining the local site with the same site definition procedure you just used. You should point to an empty directory on your hard drive as the local site. To transfer (or “import”) the existing files, define the location of the existing files as the remote site and transfer them to your computer. In Chapter 16, you’ll learn how to synchronize the local and remote site, moving all the files to your local drive so that you can edit them.

Modifying the Local Info in the Advanced Tab

While the Basic tab of the Site Definition dialog box enables you to quickly set up a site and offers additional settings to fine-tune your site definition, you might decide you prefer to define your sites using the Advanced tab. When you understand how Dreamweaver creates and manages Web sites, it might be quicker for you to use the Advanced tab to make changes to your site definition.

To modify your site definition, select the Edit Sites command from the Site menu. The Edit Sites dialog box, shown in Figure 4.7, lists all the Web sites you’ve defined in Dreamweaver. The buttons along the right side of the dialog box enable you to edit, duplicate, remove, export, or import the site definitions. Open the Site Definition dialog box again by selecting the name of your site and clicking the Edit button.

Figure 4.7. The Edit Sites dialog box displays all the sites you’ve defined in Dreamweaver.

Click the Advanced tab to display the advanced view of the site definition, as shown in Figure 4.8. Dreamweaver MX divides the site definition into seven categories, displayed on the left side of the Site Definition dialog box. The Local Info category is displayed by default. You should see the site name and location you entered earlier.

Figure 4.8. The Advanced tab displays all the attributes of your site definition.

The additional attributes in the Local Info enable you to fine-tune your local site definition. Besides the Site Name and Local Root Folder settings, you can set the following:

  • Refresh Local File List Automatically— Dreamweaver keeps the list of files up to date when this check box is selected. If you notice your computer pausing to refresh (indicating a slower computer system with insufficient memory), you can turn this option off.

  • Default Images Folder— When you use an image that is outside your Web site, Dreamweaver prompts you to copy the image into the Web site. When you save the image, Dreamweaver automatically opens the default images folder defined here. Click the Folder icon and create a directory called images in your site root. Select this directory as the default images folder, as shown in Figure 4.9.

    Figure 4.9. Define a default images folder so Dreamweaver knows where to keep any images you import into your Web site.

  • HTTP Address— Specify the final URL of your site, if you know it. This helps Dreamweaver run the link-checking report (File, Check Links). If you don’t know the final URL, just leave it blank.

  • Cache— You might have seen Dreamweaver quickly create a site cache after you defined your site. The site cache is turned on when this check box is selected. This command speeds up some of Dreamweaver’s site resources and, most important, enables the Assets panel to work. If your computer is running very slowly, you can disable this option.

You’ll explore some of the other categories in the Advanced tab of the Site Definition dialog box later in this chapter. Click the OK button to save your changes to the site definition, and click the Done button in the Edit Sites dialog box to close that dialog box.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint