Home > Articles > Web Development > Dreamweaver & Flash

Setting Up a Website in Dreamweaver CS5

  • Print
  • + Share This
Learn how to define a website and determine its root, add files and folders to a site, and use the Files panel and expand it into the Expanded Files panel, and explore ideas about how to organize a site.
This chapter is from the book

Dreamweaver makes it very easy to open and edit single web pages—much like you would a word processing document. If you're planning to create multiple pages, however, the very first thing you should do is define a site. That's what you'll do this hour. Defining a site gives you a home base to work from. Without a site definition, Dreamweaver may run into difficulties linking or organizing your files.

You use Dreamweaver's Files panel to plan, create, and manage projects. Eventually you'll have lots of files: web pages (HTML, or hypertext markup language, files), image files, CSS (Cascading Style Sheets) files, and other types of files. It's important that you define your website to start off on the right foot.

Defining a New Website

This hour introduces creating a home directory for your website and then telling Dreamweaver about it. This directory will store files for your site, and you'll build a logical structure beneath it with directories for supporting files such as images, scripts, and style sheets (more about this in later hours). Many beginning web developers simply start making web pages, skipping the site definition step—this is not recommended. You'll make your web development life easier by completing this important step before any development takes place.

Every website has a root directory. The root of a website is the main directory that contains files and other directories. When you define a website, Dreamweaver considers that directory and all the files (or other directories) within it to be the entire universe of that particular website. If you attempt to insert an image from outside that universe, Dreamweaver prompts you to save the file inside the website.

Dreamweaver needs you to define your website so that it knows how to find files. For instance, if an image is located in an images directory within the site, Dreamweaver knows how to properly reference the image within a web page. If, however, the image is somewhere outside the defined site, Dreamweaver might not be able to reference it properly, and you might end up with bad links in your website. You learn more about how Dreamweaver links to files in Hour 5, "Making Hyperlinks, Anchors, and Mailto Links."

You have to define a new website for every project you create. Even when projects are related, you might decide to break them down into smaller sites so that the number of files isn't unwieldy in a single site. For instance, I created websites for a college within a major university. Rather than trying to create a single site for the entire college, I found it easier to break down the information into different sites by department. This created more manageable chunks of information than lumping everything together. Regardless of the size of your site, you can have only a single site open in Dreamweaver at once.

To begin defining a website, open the Manage Sites dialog box by selecting Site, Manage Sites, as shown in Figure 3.1.

Figure 3.1

Figure 3.1 The Manage Sites dialog box lists all the websites you have defined and enables you to manage them.

The Manage Sites dialog box, shown in Figure 3.1, is where you can create, edit, duplicate, remove, export, and import Dreamweaver site definitions. The title says it all: This is where you manage your websites! To begin defining a new site, click the New button in the Manage Sites dialog box and choose Site. The Site Setup dialog box appears, as shown in Figure 3.2.

Figure 3.2

Figure 3.2 The Site Setup dialog allows you to name your site and create or select your web directory.

At minimum, you must fill in a name for the site and point Dreamweaver to where the files are stored on your computer. You can define a site even if you don't have any files; you simply define the site and create an empty directory that is ready to hold all the web files you create.

Building the Site Cache

After you click the Save button, Dreamweaver displays a message, telling you that it will now create the initial site cache. When you click OK, a progress bar appears (and disappears very quickly if you have nothing in your site). The initial site cache is created each time you create a new site. The site cache stores information about the links in your site so that they can be quickly updated if they change. Dreamweaver continues to update the cache as you work.

  • + Share This
  • 🔖 Save To Your Account