O'Reilly logo

Dreamweaver 8: The Missing Manual by David Sawyer McFarland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Snippets and Library Tutorial

In this tutorial, you'll do two things: first, you'll create a useful form pull-down menu snippet, and then you'll turn the National Exasperator copyright notice into a reusable Library item and add it to several pages in the site.

Note

The tutorial in this chapter requires the example files from this book's Web site, www.sawmac.com/dw8/. Click the Tutorials link to go to the tutorials page. Then click the link under Snippets and Library Tutorial to download the files.

After your browser downloads and decompresses the files, you should have a DWSnipLib (short for Dreamweaver Snippets and Libraries) folder on your computer, containing the Web pages and graphics you need for this tutorial. If you're having difficulties, the Web site contains detailed instructions for downloading the files you'll be using with this book.

To begin, you need to define a new site in Dreamweaver, using the folder you just downloaded as the local root folder. You can use Dreamweaver's Site Wizard by following the steps on Section 1.3.2, or you can use the alternate setup method described on Section 13.1.1. In either case, name the site Snippets and Library and specify the DWSnipLib folder as the local root folder. Defining sites is discussed in more detail on Section 13.1.1.

Creating a Snippet

  1. With your site freshly defined, make sure the Files panel's open.

    If the panel isn't open, press the F8 key or choose Window Files.

  2. In the Files panel, double-click the file, snippet.html ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required