Adobe Using Dreamweaver 8 User Guide Dw8

User Manual: adobe Dreamweaver - 8 - User Guide Free User Guide for Adobe Dreamweaver Software, Manual

Open the PDF directly: View PDF PDF.
Page Count: 1030

DownloadAdobe Using Dreamweaver - 8 User Guide Dw8
Open PDF In BrowserView PDF
Using Dreamweaver

Trademarks
1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central,
ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite,
FlashPaper, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML,
RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev,
and WebHelp are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or
in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within
this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in
certain jurisdictions including internationally.
Third-Party Information
This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not
responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your
own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia
endorses or accepts any responsibility for the content on those third-party sites.
Copyright © 1997-2005 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced,
translated, or converted to any electronic or machine-readable form in whole or in part without written approval from
Macromedia, Inc. Notwithstanding the foregoing, the owner or authorized user of a valid copy of the software with which
this manual was provided may print out one copy of this manual from an electronic version of this manual for the sole
purpose of such owner or authorized user learning to use such software, provided that no part of this manual may be
printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation,
commercial purposes, such as selling copies of this documentation or providing paid-for support services.
Acknowledgments
Project Management: Charles Nadeau
Writing: Jon Michael Varese
Additional Writing: Jennifer Rowe, Paul Gubbay, Charles Nadeau
Editing: Rosana Francescato, Lisa Stanziano, Anne Szabla, Mary Ferguson, Mark Nigara
Production and Editing Management: Patrice O’Neill and Rosana Francescato
Media Design and Production: Adam Barnett, Aaron Begley, Paul Benkman, John Francis, Geeta Karmarkar, Paul Rangel,
Arena Reed, Mario Reynoso
Localization Management: Melissa Baerwald
Special thanks to Sheila McGinn, Paul Gubbay, Vic Mitnick, Jim Doubek, Joaquin Blas, Wenlan Du, Ken Karleskint, Jennifer
Taylor, Jorge Taylor, Nick Halbakken, Scott Richards, Sami Kaied, John Skidgel, Masayo Noda, Kristin Conradi, Yuko Yagi, the
beta testers, and the entire Dreamweaver engineering and QA teams.
First Edition: September 2005
Macromedia, Inc.
601 Townsend St.
San Francisco, CA 94103

Contents
PART 1: DREAMWEAVER BASICS
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
What’s new in Dreamweaver 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Where to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Dreamweaver workflow for creating websites . . . . . . . . . . . . . . . . . . . . 25
Using Dreamweaver with other applications . . . . . . . . . . . . . . . . . . . . . 29
Dreamweaver and accessibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Guide to Dreamweaver instructional media . . . . . . . . . . . . . . . . . . . . . . . 31
Typographical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
HTML and web technologies resources . . . . . . . . . . . . . . . . . . . . . . . . . 36
Chapter 1: Exploring the Workspace. . . . . . . . . . . . . . . . . . . . . . . 39
About the Dreamweaver workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Working in the Document window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Using toolbars, inspectors, and context menus . . . . . . . . . . . . . . . . . . . 54
Using panels and panel groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Using Dreamweaver accessibility features . . . . . . . . . . . . . . . . . . . . . . . 64
Optimizing the workspace for accessible page design . . . . . . . . . . . . 69
Using visual guides in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Dreamweaver customizing basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Chapter 2: Setting Up a Dreamweaver Site . . . . . . . . . . . . . . . . .79
About Dreamweaver sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
Setting up a new Dreamweaver site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Using the Advanced settings to set up a Dreamweaver site. . . . . . . . 83
Editing settings for a Dreamweaver site . . . . . . . . . . . . . . . . . . . . . . . . . .87
Editing existing websites in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . 88

3

Chapter 3: Creating and Opening Documents . . . . . . . . . . . . . . . 91
Creating new documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Saving a new document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Setting a default new document type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Setting the default file extension of new HTML documents . . . . . . . . 96
Opening existing documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Cleaning up Microsoft Word HTML files . . . . . . . . . . . . . . . . . . . . . . . . . 97

PART 2: WORKING WITH DREAMWEAVER SITES
Chapter 4: Managing Your Files . . . . . . . . . . . . . . . . . . . . . . . . . . 101
About site management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Accessing sites, a server, and local drives . . . . . . . . . . . . . . . . . . . . . . . 106
Viewing files and folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
Comparing files for differences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Rolling back files (Contribute users) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Managing files and folders in the Files panel. . . . . . . . . . . . . . . . . . . . . .119
Working with a visual map of your site . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Importing and exporting sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Removing a Dreamweaver site from your list of sites . . . . . . . . . . . . . 133
Checking in and checking out files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Getting and putting files to and from your server . . . . . . . . . . . . . . . . . 140
Synchronizing the files on your local and remote sites . . . . . . . . . . . . 144
Identifying and deleting unused files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Cloaking folders and files in your site . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Storing file information in Design Notes. . . . . . . . . . . . . . . . . . . . . . . . . 150
Testing your site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Chapter 5: Managing Site Assets and Libraries . . . . . . . . . . . . . 159
About library items. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Working with assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
Creating and managing a list of favorite assets . . . . . . . . . . . . . . . . . . 168
Working with library items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Chapter 6: Managing Contribute Sites with Dreamweaver . . . . 181
About managing Contribute sites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Preparing a site for use with Contribute . . . . . . . . . . . . . . . . . . . . . . . . . 186
Administering a Contribute site using Dreamweaver. . . . . . . . . . . . . . 187
Managing Contribute files using Dreamweaver . . . . . . . . . . . . . . . . . . 189
Troubleshooting a Contribute site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

4

Contents

PART 3: LAYING OUT PAGES
Chapter 7: Laying Out Pages with CSS . . . . . . . . . . . . . . . . . . . . 197
About layers in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198
Inserting a layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Setting layer preferences and properties . . . . . . . . . . . . . . . . . . . . . . . 202
Managing layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Manipulating layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Converting layers to tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210
Animating layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212
Inserting div tags for layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221
Working with div tags for layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Changing the highlight color for div tags . . . . . . . . . . . . . . . . . . . . . . . . 223
Working with CSS layout visualization . . . . . . . . . . . . . . . . . . . . . . . . . 224
Using rulers, guides, and the grid to lay out pages . . . . . . . . . . . . . . . 226
Using a tracing image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Chapter 8: Presenting Content with Tables . . . . . . . . . . . . . . . . 233
About tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Inserting a table and adding content . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Importing and exporting tabular data . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Selecting table elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Using Expanded Tables mode for easier table editing . . . . . . . . . . . . .241
Formatting tables and cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Resizing tables, columns, and rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Adding and removing rows and columns . . . . . . . . . . . . . . . . . . . . . . 250
Splitting and merging cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251
Copying, pasting, and deleting cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Nesting tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Sorting tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Chapter 9: Laying Out Pages in Layout Mode . . . . . . . . . . . . . 257
About Layout mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Switching from Standard to Layout mode . . . . . . . . . . . . . . . . . . . . . . .261
Drawing in Layout mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Adding content to a layout cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Clearing automatically set cell heights. . . . . . . . . . . . . . . . . . . . . . . . . . 267
Resizing and moving layout cells and tables . . . . . . . . . . . . . . . . . . . . 267
Formatting layout cells and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Setting column width. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Setting preferences for Layout mode . . . . . . . . . . . . . . . . . . . . . . . . . . 273

Contents

5

Chapter 10: Using Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
About frames and framesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Working with framesets in the Document window. . . . . . . . . . . . . . . 280
Creating frames and framesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Selecting frames and framesets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284
Opening a document in a frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Saving frame and frameset files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Viewing and setting frame properties and attributes . . . . . . . . . . . . . .288
Viewing and setting frameset properties . . . . . . . . . . . . . . . . . . . . . . . 290
Controlling frame content with links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Handling browsers that can’t display frames. . . . . . . . . . . . . . . . . . . . .292
Using JavaScript behaviors with frames . . . . . . . . . . . . . . . . . . . . . . . .293
Chapter 11: Managing Templates . . . . . . . . . . . . . . . . . . . . . . . . 295
About Dreamweaver templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
Creating a Dreamweaver template . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Creating templates for a Contribute site . . . . . . . . . . . . . . . . . . . . . . . . . 312
Creating editable regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Creating repeating regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Using optional regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Defining editable tag attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323
Creating a nested template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324
Editing and updating templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
Managing templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329
Exporting and importing template XML content . . . . . . . . . . . . . . . . 330
Exporting a site without template markup . . . . . . . . . . . . . . . . . . . . . . .332
Applying or removing a template from an existing document . . . . . .332
Editing content in a template-based document . . . . . . . . . . . . . . . . . .334

PART 4: ADDING CONTENT TO PAGES
Chapter 12: Working with Pages . . . . . . . . . . . . . . . . . . . . . . . . . 341
About working with pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Saving web pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345
Specifying HTML instead of CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Setting page properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Working with colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Selecting elements in the Document window . . . . . . . . . . . . . . . . . . . . 351
Zooming in and out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354
Using the History panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355

6

Contents

Automating tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using JavaScript behaviors to detect browsers and plug-ins . . . . .
Previewing and testing pages in browsers . . . . . . . . . . . . . . . . . . . . . .
Setting download time and size preferences . . . . . . . . . . . . . . . . . . . .

356
363
363
366

Chapter 13: Inserting and Formatting Text . . . . . . . . . . . . . . . . 369
About text formatting in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . 369
Inserting text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
Formatting paragraphs and document structure. . . . . . . . . . . . . . . . . 385
Formatting text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Using Cascading Style Sheets to format text . . . . . . . . . . . . . . . . . . . 394
Checking spelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Searching for and replacing text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Chapter 14: Inserting Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
About images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Inserting an image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Resizing an image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414
Cropping an image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .415
Optimizing an image using Fireworks . . . . . . . . . . . . . . . . . . . . . . . . . . .416
Adjusting the brightness and contrast of an image. . . . . . . . . . . . . . . .416
Sharpening an image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Creating a rollover image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418
Using an external image editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419
Applying behaviors to images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Chapter 15: Linking and Navigation . . . . . . . . . . . . . . . . . . . . . . . 421
Understanding document locations and paths . . . . . . . . . . . . . . . . . . 422
Jump menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Navigation bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
About image maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Creating links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Managing links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Inserting jump menus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .441
Using navigation bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Using image maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Attaching JavaScript behaviors to links . . . . . . . . . . . . . . . . . . . . . . . . 448
Checking for broken, external, and orphaned links. . . . . . . . . . . . . . . 449
Fixing broken links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
Opening linked documents in Dreamweaver . . . . . . . . . . . . . . . . . . . . 452

Contents

7

Chapter 16: Working with Other Applications . . . . . . . . . . . . . . 453
About Fireworks and Flash integration. . . . . . . . . . . . . . . . . . . . . . . . . .453
Optimizing your work environment for Fireworks and Flash . . . . . . 454
Working with Fireworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Working with Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466
Chapter 17: Adding Audio, Video, and Interactive Elements . . 469
About media files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .470
Inserting and editing media objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . .472
Starting an external editor for media files. . . . . . . . . . . . . . . . . . . . . . . .474
Using Design Notes with media objects . . . . . . . . . . . . . . . . . . . . . . . . . 476
Inserting and modifying a Flash button object . . . . . . . . . . . . . . . . . . . 476
Inserting a Flash text object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .479
Inserting Flash content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
Downloading and installing Flash elements . . . . . . . . . . . . . . . . . . . . 480
Inserting Flash elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Editing Flash element attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Inserting FlashPaper documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482
Inserting Flash Video content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .483
Inserting Shockwave movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
Adding video (non-Flash) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
Adding sound to a page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .488
Inserting Netscape Navigator plug-in content . . . . . . . . . . . . . . . . . . 489
Inserting an ActiveX control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
Inserting a Java applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Using behaviors to control media. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Chapter 18: Using JavaScript Behaviors . . . . . . . . . . . . . . . . . . 493
Using the Behaviors panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
About events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Applying a behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
Attaching a behavior to text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .497
Changing a behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Updating a behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Creating new actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Downloading and installing third-party behaviors . . . . . . . . . . . . . . . 499
Using the behavior actions that come with Dreamweaver . . . . . . . . 499

8

Contents

PART 5: WORKING WITH PAGE CODE
Chapter 19: Setting Up Your Coding Environment . . . . . . . . . . . 531
Viewing your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531
Using the coder-oriented workspace (Windows only) . . . . . . . . . . . . 533
Setting coding preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Customizing keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
Opening files in Code view by default . . . . . . . . . . . . . . . . . . . . . . . . . . 537
Setting Validator preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
Managing tag libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
Importing custom tags into Dreamweaver . . . . . . . . . . . . . . . . . . . . . . 543
Using an external HTML editor with Dreamweaver . . . . . . . . . . . . . . 545
Chapter 20: Coding in Dreamweaver. . . . . . . . . . . . . . . . . . . . . 549
About coding in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
Writing and editing code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
Searching and replacing tags and attributes . . . . . . . . . . . . . . . . . . . . 570
Making quick changes to a code selection . . . . . . . . . . . . . . . . . . . . . . 572
Using language-reference material . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
Printing your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
Chapter 21: Optimizing and Debugging Your Code . . . . . . . . . 575
Cleaning up your code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
Verifying that tags and braces are balanced . . . . . . . . . . . . . . . . . . . . 576
Checking for browser compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Validating your tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
Making pages XHTML-compliant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .581
Using the ColdFusion debugger (Windows only) . . . . . . . . . . . . . . . . 582
Chapter 22: Editing Code in Design View . . . . . . . . . . . . . . . . . 585
Editing code with the Property inspector . . . . . . . . . . . . . . . . . . . . . . . 585
Changing attributes with the Tag inspector . . . . . . . . . . . . . . . . . . . . . 586
Editing code with the Quick Tag Editor . . . . . . . . . . . . . . . . . . . . . . . . . 587
Editing code with the tag selector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590
Editing scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .591
Working with server-side includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
Using JavaScript behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
Viewing and editing head content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595

Contents

9

PART 6: PREPARING TO BUILD DYNAMIC SITES
Chapter 23: Setting Up a Web Application . . . . . . . . . . . . . . . . 599
What you need to build web applications. . . . . . . . . . . . . . . . . . . . . . . 599
Setting up a web server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
Setting up an application server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
Creating a root folder for the application . . . . . . . . . . . . . . . . . . . . . . . 605
Defining a Dreamweaver site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
Connecting to a database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Chapter 24: Database Connections for ColdFusion
Developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
Connecting to a database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .611
Editing or deleting a database connection. . . . . . . . . . . . . . . . . . . . . . . 613
Chapter 25: Database Connections for ASP.NET Developers . 615
Connecting to a database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
Editing or deleting a database connection. . . . . . . . . . . . . . . . . . . . . . . 619
Chapter 26: Database Connections for ASP Developers . . . . . 621
About database connections in ASP . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Creating a DSN connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .624
Creating a DSN-less connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
Connecting to a database on an ISP . . . . . . . . . . . . . . . . . . . . . . . . . . . .628
Editing or deleting a database connection. . . . . . . . . . . . . . . . . . . . . . .632
Chapter 27: Database Connections for JSP Developers . . . . 633
About database connections in JSP . . . . . . . . . . . . . . . . . . . . . . . . . . . .633
Connecting to a database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .635
Connecting through an ODBC driver . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
Editing or deleting a database connection. . . . . . . . . . . . . . . . . . . . . . 640
Chapter 28: Database Connections for PHP Developers . . . . . 641
Connecting to a database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
Editing or deleting a database connection. . . . . . . . . . . . . . . . . . . . . . .642
Chapter 29: Troubleshooting Database Connections . . . . . . . 643
Troubleshooting permissions problems . . . . . . . . . . . . . . . . . . . . . . . . .643
Troubleshooting Microsoft error messages. . . . . . . . . . . . . . . . . . . . . .645
Troubleshooting MySQL error messages . . . . . . . . . . . . . . . . . . . . . . 650

10

Contents

PART 7: MAKING PAGES DYNAMIC
Chapter 30: Optimizing the Workspace for
Visual Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
Displaying web-application development panels . . . . . . . . . . . . . . . . 653
Viewing your database within Dreamweaver . . . . . . . . . . . . . . . . . . . . 656
Viewing live data in Design view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
Working in Design view without live data . . . . . . . . . . . . . . . . . . . . . . . 662
Previewing dynamic pages in a browser . . . . . . . . . . . . . . . . . . . . . . . . 663
Restricting database information displayed in Dreamweaver . . . . . 664
Chapter 31: The Workflow for Dynamic Page Design . . . . . . . 665
Designing the page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
Creating a source of dynamic content . . . . . . . . . . . . . . . . . . . . . . . . . . 666
Adding dynamic content to a web page . . . . . . . . . . . . . . . . . . . . . . . . 668
Enhancing the functionality of a dynamic page . . . . . . . . . . . . . . . . . . 668
Testing and debugging the page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
Chapter 32: Obtaining Data for Your Page . . . . . . . . . . . . . . . . 673
Using a database to store content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
Collecting data submitted by users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
Accessing data stored in session variables . . . . . . . . . . . . . . . . . . . . . 679
Chapter 33: Defining Sources of Dynamic Content . . . . . . . . . 685
About dynamic content sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
Defining a recordset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .691
Defining URL parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
Defining form parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696
Defining session variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
Defining application variables for ASP and ColdFusion . . . . . . . . . . 699
Using a variable as a data source for a ColdFusion recordset . . . . . 700
Defining server variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
Caching content sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
Changing or deleting content sources . . . . . . . . . . . . . . . . . . . . . . . . . . 704
Copying a recordset from one page to another page . . . . . . . . . . . . . 705
Chapter 34: Adding Dynamic Content to Web Pages . . . . . . . 707
About adding dynamic content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
Making text dynamic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
Making images dynamic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
Making HTML attributes dynamic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

Contents

11

Making ActiveX, Flash, and other object parameters dynamic . . . . .
Editing dynamic content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deleting dynamic content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating dynamic pages in a Contribute site . . . . . . . . . . . . . . . . . . . . .

714
715
715
716

Chapter 35: Displaying Database Records . . . . . . . . . . . . . . . . . 717
About displaying database records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
Using predefined data formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
Creating recordset navigation links . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
Showing and hiding regions based on recordset results . . . . . . . . . . 728
Displaying multiple recordset results . . . . . . . . . . . . . . . . . . . . . . . . . . .729
Creating a table with a Repeat Region server behavior . . . . . . . . . . .730
Creating a record counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
Chapter 36: Displaying XML Data in Web Pages. . . . . . . . . . . .735
About using XML and XSL with web pages . . . . . . . . . . . . . . . . . . . . . 735
About server-side XSL transformations. . . . . . . . . . . . . . . . . . . . . . . . . 737
About client-side XSL transformations . . . . . . . . . . . . . . . . . . . . . . . . .740
About XML data and repeating elements . . . . . . . . . . . . . . . . . . . . . . . 743
About previewing XML data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .744
Performing XSL transformations on the server . . . . . . . . . . . . . . . . . . 746
Performing XSL transformations on the client . . . . . . . . . . . . . . . . . . .760
Applying styles to XSLT fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763
Troubleshooting XSL transformations . . . . . . . . . . . . . . . . . . . . . . . . . . 764
Chapter 37: Using Web Services . . . . . . . . . . . . . . . . . . . . . . . . .765
About web services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766
Configuring proxy generators for use with Dreamweaver . . . . . . . . . 770
Adding a web service proxy using the WSDL description . . . . . . . . . 773
Adding a web service to a page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774
Editing the UDDI web service site list . . . . . . . . . . . . . . . . . . . . . . . . . . . 776
Chapter 38: Adding Custom Server Behaviors. . . . . . . . . . . . . . 777
About custom server behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777
Installing third-party server behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . 787
Using the Server Behavior Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788
Using parameters in server behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . 791
Positioning code blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .792
Creating a dialog box for a custom server behavior . . . . . . . . . . . . . .794
Editing and modifying server behaviors . . . . . . . . . . . . . . . . . . . . . . . . .796

12

Contents

Chapter 39: Creating Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
About forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
Creating HTML forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
Inserting HTML form objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
Inserting dynamic HTML form objects . . . . . . . . . . . . . . . . . . . . . . . . . .810
Validating HTML form data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .814
Attaching JavaScript behaviors to HTML form objects . . . . . . . . . . .815
Attaching custom scripts to HTML form buttons . . . . . . . . . . . . . . . . .815
Creating accessible HTML forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .816

PART 8: DEVELOPING APPLICATIONS RAPIDLY
Chapter 40: Building ColdFusion Applications Rapidly . . . . . . . 821
About rapid application development (all servers) . . . . . . . . . . . . . . . .821
Building ColdFusion MX 7 forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
Building master/detail pages (ColdFusion) . . . . . . . . . . . . . . . . . . . . . 838
Building search/results pages (ColdFusion, ASP, JSP, PHP). . . . . 847
Building a record insert page (all servers) . . . . . . . . . . . . . . . . . . . . . . . 853
Building pages to update a record (ColdFusion). . . . . . . . . . . . . . . . . 856
Building pages to delete a record (ColdFusion) . . . . . . . . . . . . . . . . . 863
Using stored procedures to modify databases (ColdFusion) . . . . . . 872
Building pages that restrict access to your site (ColdFusion,
ASP, JSP, PHP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874
Securing a folder in your application (ColdFusion) . . . . . . . . . . . . . . . 884
Using ColdFusion components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884
Chapter 41: Building ASP.NET Applications Rapidly . . . . . . . . 893
Building ASP.NET forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893
Creating ASP.NET DataGrid and DataList web controls . . . . . . . . . 897
Building master/detail pages (ASP.NET) . . . . . . . . . . . . . . . . . . . . . . . 902
Building a database search page (ASP.NET) . . . . . . . . . . . . . . . . . . . 909
Building a record insert page (ASP.NET) . . . . . . . . . . . . . . . . . . . . . . . .915
Building pages to update a record (ASP.NET) . . . . . . . . . . . . . . . . . . .915
Building pages to delete a record (ASP.NET) . . . . . . . . . . . . . . . . . . . 924
Using stored procedures to modify databases (ASP.NET) . . . . . . . 932
Building pages that restrict access to your site (ASP.NET) . . . . . . . 934
Chapter 42: Building ASP and JSP Applications Rapidly. . . . 935
Building master/detail pages (ASP and JSP) . . . . . . . . . . . . . . . . . . . 935
Building search/results pages (ASP and JSP) . . . . . . . . . . . . . . . . . . 939

Contents

13

Building a record insert page (ASP and JSP). . . . . . . . . . . . . . . . . . .
Building pages to update a record (ASP and JSP) . . . . . . . . . . . . . .
Building pages to delete a record (ASP and JSP). . . . . . . . . . . . . . .
Building pages with advanced data manipulation objects
(ASP and JSP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Building pages that restrict access to your site (ASP and JSP) . . .
Using JavaBeans (JSP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

939
940
945
949
953
953

Chapter 43: Building PHP Applications Rapidly . . . . . . . . . . . 957
Building master/detail pages (PHP) . . . . . . . . . . . . . . . . . . . . . . . . . . . .957
Building search/results pages (PHP) . . . . . . . . . . . . . . . . . . . . . . . . . . .963
Building a record insert page (PHP) . . . . . . . . . . . . . . . . . . . . . . . . . . . 964
Building pages to update a record (PHP) . . . . . . . . . . . . . . . . . . . . . . 964
Building pages to delete a record (PHP) . . . . . . . . . . . . . . . . . . . . . . . . 971
Building pages that restrict access to your site (PHP) . . . . . . . . . . . .979

PART 9: APPENDIXES
Appendix A: Beginner’s Guide to Databases . . . . . . . . . . . . . . 983
About databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .983
Database design basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 984
Understanding database connections . . . . . . . . . . . . . . . . . . . . . . . . . . 991
Appendix B: SQL Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997
Syntax basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .997
Defining the columns of a recordset . . . . . . . . . . . . . . . . . . . . . . . . . . . 999
Limiting the records in a recordset . . . . . . . . . . . . . . . . . . . . . . . . . . . . 999
Sorting the records in a recordset . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1003
Joining tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1003
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1005

14

Contents

1

PART 1

Dreamweaver Basics
Learn how to use Macromedia Dreamweaver 8 documentation and other
resources, and set up the Dreamweaver workspace to fit your preferred
working style. Then plan and set up a site, and begin to create pages.
This part contains the following chapters:
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Chapter 1: Exploring the Workspace . . . . . . . . . . . . . . . . . . . . . . . . .39
Chapter 2: Setting Up a Dreamweaver Site . . . . . . . . . . . . . . . . . . . 79
Chapter 3: Creating and Opening Documents. . . . . . . . . . . . . . . . . 91

15

Introduction
Macromedia Dreamweaver 8 is a professional HTML editor for designing, coding, and
developing websites, web pages, and web applications. Whether you enjoy the control of
hand-coding HTML or prefer to work in a visual editing environment, Dreamweaver
provides you with helpful tools to enhance your web creation experience.
The visual editing features in Dreamweaver let you quickly create pages without writing a line
of code. You can view all your site elements or assets and drag them from an easy-to-use panel
directly into a document. You can streamline your development workflow by creating and
editing images in Macromedia Fireworks or another graphics application, then importing
them directly into Dreamweaver, or by adding Macromedia Flash objects.
Dreamweaver also provides a full-featured coding environment that includes code-editing
tools (such as code coloring and tag completion) and language reference material on
Cascading Style Sheets (CSS), JavaScript, and ColdFusion Markup Language (CFML),
among others. Macromedia Roundtrip HTML technology imports your hand-coded HTML
documents without reformatting the code; you can then reformat code with your preferred
formatting style.
Dreamweaver also enables you to build dynamic database-backed web applications using
server technologies such as CFML, ASP.NET, ASP, JSP, and PHP.
Dreamweaver is fully customizable. You can create your own objects and commands, modify
keyboard shortcuts, and even write JavaScript code to extend Dreamweaver capabilities with
new behaviors, Property inspectors, and site reports.
This chapter contains the following sections:
What’s new in Dreamweaver 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Where to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Dreamweaver workflow for creating websites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Using Dreamweaver with other applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Dreamweaver and accessibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

17

Guide to Dreamweaver instructional media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Typographical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
HTML and web technologies resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

What’s new in Dreamweaver 8
Dreamweaver 8 includes various new features that improve usability and help you to build
pages whether you’re working in the design or the coding environment.
First, Dreamweaver 8 provides support for best practices and industry standards, including
support for advanced CSS use, XML and RSS feeds, and accessibility requirements.
Work with best practices
Visual authoring with XML
data

Get up to speed with XML using powerful, visual tools to
integrate feeds into work and remove the mystery from XML to
HTML translation. Integrate XML-based data, such as RSS
feeds, into web pages using a simple drag-and-drop workflow.
Jump to Code view to customize the transformation, using
improved code hinting for XML and XSLT. For more
information, see Chapter 36, “Displaying XML Data in
Web Pages,” on page 735.

New, unified CSS panel

The new, unified CSS panel provides a central location for
learning, understanding, and working with the CSS styles
applied to pages in a visual way. All the CSS functionality is
consolidated into one panel set and enhanced to make working
with CSS styles easier and more productive. The new interface
makes it easier to see the cascade of styles applied to a specific
element so that you can easily identify where attributes are
defined. A property grid allows for quick edits. For more
information, see “Using the CSS Styles panel” on page 394,

CSS layout visualization

Apply visual aides at design time to outline CSS layout borders
or color CSS layouts. Applying visual aides reveals complex
nesting schemes and improves selection. Click the CSS layout
for valuable tooltips that help you understand the elements that
are controlling the design. See Chapter 7, “Laying Out Pages
with CSS,” on page 197.

Style Rendering toolbar

View content the same way users will see it no matter what the
delivery mechanism with new support for CSS media types.
Use the Style Rendering toolbar to toggle to Design view and
see how it will look in print, on a handheld, or onscreen. See
“The Style Rendering toolbar” on page 49.

18

Introduction

Work with best practices
CSS rendering
improvements

Match how complex CSS layouts will render in most browsers
with substantial improvements in Design view accuracy.
Dreamweaver now fully supports advanced CSS techniques,
such as overflow, pseudo-elements, and form elements.

Accessibility: Support for
WCAG/W3C priority 2
checkpoints

In addition to the integrated accessibility evaluation tool for
Section 508 and WCAG Priority 1 checkpoints, Dreamweaver
now supports both CSS and accessibility with an updated
evaluation tool that includes WCAG Priority 2 checkpoints.

Improved WebDAV

WebDAV in Dreamweaver 8 now supports digest
authentication and SSL for secure file transfer, and offers
improved connectivity with a wider array of servers. See “Using
WebDAV to check in and check out files” on page 136.

Get more done in less time with optimized user workflows that reduce the time required to
complete common tasks. Dreamweaver 8 takes the hassle out of the little things so you can
spend more time designing and developing engaging websites and applications.
Get more done
Background file transfer

Keep working while Dreamweaver 8 uploads files to the server.
For more information, see “Managing file transfers”
on page 144.

Zoom

Get greater control over your design with zoom. Zoom in and
inspect an image or work with a complex nested table layout.
Zoom out to preview how a page will look. For more
information, see “Zooming in and out” on page 354.

Guides

Compare the page layout to page mockups with pixel-perfect
accuracy using guides to measure page layouts. Visual
feedback helps measure distances accurately and supports
intelligent snapping. For more information, see “Using guides”
on page 227.

Coding toolbar

The new Coding toolbar provides buttons for common coding
features in a gutter bar along the side of Code view. For more
information, see “Inserting code quickly with the Coding
toolbar” on page 561.

Code collapse

Focus only on the code you want to see by hiding and
expanding blocks of code. For more information, see
“Collapsing and expanding code fragments” on page 566.

What’s new in Dreamweaver 8

19

Get more done
Workspace layouts

Customize and save workspace configurations. Dreamweaver
8 ships with four different configurations tailored to the needs of
designers and coders. You can also build a custom workspace.
For more information, see “Saving custom workspace layouts”
on page 73.

Tabbed documents for the
Mac

New document tabs on the Mac help simplify the user interface
and make it easier to select documents. For more information,
see “Displaying tabbed documents (Macintosh)” on page 72.

New starter pages

New layouts and designs let you to create sites quickly.

Improved site synchronize
and check-in/check-out

Manage sites with increased reliability and confidence.
Improved site synchronization features help ensure that the file
in use is the latest version. Prevent accidental overwriting of
others' work with improved check-in/check-out functionality.
For more information, see “Synchronizing the files on your local
and remote sites” on page 144.

Compare files

Quickly compare files to identify what has changed. You can
compare two local files, a file on the local computer and one on
a remote computer, or two files on the remote computer. Use
your favorite file comparison tool with Dreamweaver on both
the Macintosh and Windows platforms. For more information,
see “Comparing files for differences” on page 113.

Paste Special

With the new pasting options in Dreamweaver, you can retain
all the source formatting created in Microsoft Word, or just
paste the text. For more information, see “Adding text to a
document” on page 381.

Site-relative references

Work seamlessly with server-side includes at design time and
runtime by ensuring that references are relative to sites instead
of local files. For more information, see “Setting the relative
path of new links” on page 432.

Code-editing improvements Gain greater control over how Dreamweaver provides code
hints and completes tags to fit with your coding style.

20

Introduction

Dreamweaver 8 supports efforts to learn and take advantage of new technologies, including
PHP 5, Flash Video, ColdFusion MX 7, and the Macromedia Web Publishing System.
Integrates with the latest technologies and standards
Support for ColdFusion MX Updated support for ColdFusion MX 7 includes new server
7
behaviors and code hinting. To match the code hinting and
debugging with the correct version of ColdFusion,
Dreamweaver automatically detects the server version the first
time it connects to the site. The tight integration between
Dreamweaver and ColdFusion lets you add and remove
databases directly from the Databases panel, and view only
ColdFusion components defined in the current site. For more
information, see “Enabling the ColdFusion enhancements”
on page 828.
Support for PHP 5

Take advantage of updated support for PHP 5, including server
behaviors and code hinting.

Flash Video

Quickly and easily insert a Flash Video file in a web page. For
more information, see “Inserting Flash Video content”
on page 483.

Macromedia Web
Publishing System:
notification and event
logging

Keep track of everything that is going on within your site.
Events in Dreamweaver notify the Macromedia Web Publishing
System server so that all changes to a website in the WPS
system are recorded.

Updated reference material Consult new reference content for XML, XSLT, and XPath, and
from O'Reilly
updated content for ASP and JSP.

Where to start
Dreamweaver documentation includes information for readers from various backgrounds.
To get the most out of the documentation, start by reading the parts that are most appropriate
for you.
For information about Dreamweaver resources, see “Guide to Dreamweaver instructional
media” on page 31.

Where to start

21

Web-design novices
If you are relatively new to web design, this section will point you to sections of the
Dreamweaver documentation that are most appropriate for your background.
For web-design novices:
1.

Begin by reading the tutorials in Getting Started in Dreamweaver.

2.

In Using Dreamweaver (Help > Using Dreamweaver), read Chapter 1, “Exploring the
Workspace,” on page 39, Chapter 2, “Setting Up a Dreamweaver Site,” on page 79,
Chapter 4, “Managing Your Files,” on page 101, and Chapter 3, “Creating and Opening
Documents,” on page 91.

3.

Learn about page layout by reading Chapter 9, “Laying Out Pages in Layout Mode,” on
page 257.

4.

To learn about formatting text and including images in your pages, read Chapter 13,
“Inserting and Formatting Text,” on page 369 and Chapter 14, “Inserting Images,” on
page 407.

That’s all you really need to begin producing high-quality websites, but when you’re ready to
learn how to use more advanced tools, you can proceed through the rest of the static-page
chapters in Using Dreamweaver. You might want to wait to read the dynamic-page chapters
until you’re more familiar with creating web pages.

Experienced web designers
If you are an experienced web designer, this section will point you to sections of the
Dreamweaver documentation that are most appropriate for your background. There are two
different approaches: one for designers who are new to Dreamweaver and one for designers
who are familiar with Dreamweaver but would like to learn more about creating dynamic
pages.
For experienced web designers who are new to Dreamweaver:
1.

Begin by reading the tutorials in Getting Started in Dreamweaver.

2.

In Using Dreamweaver, read Chapter 1, “Exploring the Workspace,” on page 39 to learn
more about the Dreamweaver user interface.

3.

Although much of the material in Chapter 2, “Setting Up a Dreamweaver Site,” on page 79
and Chapter 4, “Managing Your Files,” on page 101 is probably familiar to you, you
should skim those chapters to see how these familiar concepts are implemented in
Dreamweaver. Pay particular attention to the sections about setting up a Dreamweaver site.

22

Introduction

4.

For useful information on the details of using Dreamweaver to create basic HTML pages,
read Chapter 13, “Inserting and Formatting Text,” on page 369 and Chapter 14,
“Inserting Images,” on page 407.

5.

For information about coding in Dreamweaver, see “Setting Up Your Coding
Environment” on page 531, “Coding in Dreamweaver” on page 549, “Optimizing and
Debugging Your Code” on page 575, and “Editing Code in Design View” on page 585.

6.

Read the overview at the beginning of each of the other chapters in Using Dreamweaver to
determine whether its topics are of interest to you.

For experienced web designers, familiar with Dreamweaver, who want to learn
about creating dynamic pages:
1.

Begin by reading Chapter 12, “Understanding Web Applications” and “Tutorial:
Developing a Web Application” in Getting Started with Dreamweaver.

2.

In Using Dreamweaver, skim Chapter 1, “Exploring the Workspace,” on page 39 to learn
about new aspects of the Dreamweaver user interface, then read “Optimizing the
Workspace for Visual Development” on page 653.

3.

Become familiar with the Dreamweaver workflow for dynamic pages by reading “The
Workflow for Dynamic Page Design” on page 665.

4.

Set up a web server and application server. (See Chapter 23, “Setting Up a Web
Application,” on page 599.)

5.

Connect to a database. (See “Connecting to a database” on page 609.)

6.

Read the overview at the beginning of each chapter in Using Dreamweaver to determine
whether its topics are of interest to you.

7.

If you’re interested in customizing Dreamweaver by hand, read “Customizing
Dreamweaver” on the Macromedia Support Center at www.macromedia.com/go/
customizing_dreamweaver. If you want to write extensions for Dreamweaver, read
Extending Dreamweaver.

Where to start

23

Experienced hand-coders
If you are an experienced hand-coder, this section will point you to sections of the
Dreamweaver documentation that are most appropriate for your background.
For experienced hand-coders:
1.

In Using Dreamweaver, read Chapter 1, “Exploring the Workspace,” on page 39 to learn
more about the Dreamweaver user interface.

2.

Although much of the material in Chapter 2, “Setting Up a Dreamweaver Site,” on page 79
and Chapter 4, “Managing Your Files,” on page 101 is probably familiar to you, skim those
chapters to see how these familiar concepts are implemented in Dreamweaver. Pay
particular attention to the sections on setting up a Dreamweaver site.

3.

Read more about coding with Dreamweaver in Chapter 19, “Setting Up Your Coding
Environment,” on page 531, Chapter 20, “Coding in Dreamweaver,” on page 549,
Chapter 21, “Optimizing and Debugging Your Code,” on page 575, and Chapter 22,
“Editing Code in Design View,” on page 585.

4.

Read the overview at the beginning of each chapter in Using Dreamweaver to determine
whether its topics are of interest to you.

Web application developers
If you are a web application developer, this section will point you to sections of the
Dreamweaver documentation that are most appropriate for your background. There are two
different approaches, depending on whether you’ve used Dreamweaver before.
For web application developers who have not used Dreamweaver:
1.

Begin by quickly reading Getting Started in Dreamweaver to familiarize yourself with the
basics of using Dreamweaver.

2.

In Using Dreamweaver, read Chapter 1, “Exploring the Workspace,” on page 39 to learn
more about the Dreamweaver user interface.

3.

Although much of the material in Chapter 2, “Setting Up a Dreamweaver Site,” on page 79
and Chapter 4, “Managing Your Files,” on page 101 is probably familiar to you, skim those
chapters to see how these familiar concepts are implemented in Dreamweaver. Pay
particular attention to the sections on setting up a Dreamweaver site.

4.

Set up a web server and application server using Dreamweaver. (See Chapter 23, “Setting
Up a Web Application,” on page 599.)

24

Introduction

5.

Connect to a database. (See “Connecting to a database” on page 609.)

6.

Read the overview at the beginning of each of the chapter in Using Dreamweaver to
determine whether its topics are of interest to you.

For experienced web application developers who have used Dreamweaver:
1.

Begin by reading “What’s new in Dreamweaver 8” on page 18.

2.

In Using Dreamweaver, skim Chapter 1, “Exploring the Workspace,” on page 39 to learn
about new aspects of the Dreamweaver user interface.

3.

If you’re interested in customizing Dreamweaver by hand, read “Customizing
Dreamweaver” on the Macromedia Support Center at www.macromedia.com/go/
customizing_dreamweaver. If you want to write extensions for Dreamweaver, read
Extending Dreamweaver.

Dreamweaver workflow for creating
websites
There are many possible approaches to creating a website. The workflow presented in this
documentation starts by defining a site’s strategy or goals. If you’re developing web
applications, you have to set up servers and databases as needed. Then you design the look
and feel of the site. When the design is complete, you build the site and code the pages,
adding content and interactivity; then you link pages together, and test the site for
functionality and to see if it meets its defined objectives. You can include dynamic pages in
your site as well. At the end of the cycle, you publish the site on a server. Many developers also
schedule periodic maintenance to ensure that the site remains current and functional.

Planning your site
Planning and organizing your site carefully from the start can save you time later on.
Organizing your site includes not only determining where the files will go, but also examining
site requirements, audience profiles, and site goals. Additionally, you should consider
technical requirements such as user access, as well as browser, plug-in, and download
restrictions.

Dreamweaver workflow for creating websites

25

Once you’ve organized your information and determined a structure, you can begin creating
your site.
■

Use the Dreamweaver Files panel to set up your site’s organizational structure. In the Files
panel, you can easily add, delete, and rename files and folders to change the organization
as needed. (See Chapter 2, “Setting Up a Dreamweaver Site,” on page 79 and Chapter 4,
“Managing Your Files,” on page 101.)

■

You can begin to create simple pages which you’ll later turn into more complex designs.
Create new blank pages or pages based on predesigned page designs. (See Chapter 3,
“Creating and Opening Documents,” on page 91.)

If you work on a web-development team, you may also be interested in these topics:
■

Set up a system to prevent team members from overwriting files. (See “Checking in and
checking out files” on page 134.)

■

Use Design Notes to communicate with web team members. (See “Storing file
information in Design Notes” on page 150.)

Managing your site files
The Dreamweaver Files and Assets panels make it easy for you to manage your site files.
■

In the Dreamweaver Files panel you’ll find many tools to help you manage your site,
transfer files to and from a remote server, set up a Check In/Check Out process to prevent
files from being overwritten, and synchronize the files on your local and remote sites. (See
“Managing Your Files” on page 101.)

■

Use the Assets panel to easily organize the assets in a site; you can then drag most assets
directly from the Assets panel into a Dreamweaver document. (See Chapter 5, “Managing
Site Assets and Libraries,” on page 159.)

■

You can use Dreamweaver to manage aspects of your Contribute sites. (See Chapter 6,
“Managing Contribute Sites with Dreamweaver,” on page 181.)

Laying out web pages
Dreamweaver provides you flexibility as you mock-up and work toward a final layout for your
pages. Choose the layout technique that works for you, or use the Dreamweaver layout
options in conjunction with one another to create your site’s look.
■

26

You can use Dreamweaver layers or CSS positioning styles to create your layout. (See
Chapter 7, “Laying Out Pages with CSS,” on page 197.)

Introduction

■

The table tools and Layout mode in Dreamweaver let you quickly design web pages by
drawing and then rearranging the page structure. (See Chapter 8, “Presenting Content
with Tables,” on page 233 and Chapter 9, “Laying Out Pages in Layout Mode,” on
page 257.)

■

If you want to display multiple documents at once in a web browser, you can lay out
documents using frames. (See Chapter 10, “Using Frames,” on page 275.)

■

Dreamweaver templates enable you to easily apply reusable content and page designs to
your site. You can create new pages based on a Dreamweaver template, then update the
layout of those pages automatically when the template changes. (See Chapter 11,
“Managing Templates,” on page 295.)

Adding content to pages
Using Dreamweaver, you can easily add a variety of content to web pages. Add assets and
design elements, such as text, images, colors, movies, sound, and other forms of media.
■

Dreamweaver page creation features enable you to specify web page properties such, as
page titles, background images and colors. In addition, Dreamweaver provides tools to
help you maximize website performance, and to test pages to ensure compatibility with
different web browsers. (See Chapter 12, “Working with Pages,” on page 341.)

■

Type directly in a Dreamweaver document, or import text from other documents, then
format the text using the Dreamweaver Property inspector. You can also easily create your
own Cascading Style Sheets. (See Chapter 13, “Inserting and Formatting Text,” on
page 369.)

■

Insert images, including rollover images, image maps, and Fireworks sliced images, and
use alignment tools to position images in a page. You can also resize images directly in
Dreamweaver. (See Chapter 14, “Inserting Images,” on page 407 and Chapter 16,
“Working with Other Applications,” on page 453.)

■

With Dreamweaver you can create standard HTML links, including anchor links and email links, or easily set up graphical navigation systems, such as jump menus and
navigation bars. (See Chapter 15, “Linking and Navigation,” on page 421.)

■

Insert other types of media in a web page, such as Flash, Shockwave, and QuickTime
movies, sound, and applets. (See Chapter 17, “Adding Audio, Video, and Interactive
Elements,” on page 469.)

■

Use behaviors to perform tasks in response to specific events, such as highlighting a button
when the visitor passes the pointer over it, validating a form when the visitor clicks the
Submit button, or opening a second browser window when the main page is finished
loading. (See Chapter 18, “Using JavaScript Behaviors,” on page 493.)

Dreamweaver workflow for creating websites

27

Hand-coding
Coding web pages by hand is another approach to creating pages. Dreamweaver provides easyto-use visual editing tools, but it also provides a sophisticated coding environment; you can
use either approach, or both, to create and edit your pages.
■

You can work in a coding environment without visual tools; coding tools help you create
and edit code, format code, and make sure that your code adheres to standards. (See
Chapter 19, “Setting Up Your Coding Environment,” on page 531 and Chapter 20,
“Coding in Dreamweaver,” on page 549, and Chapter 21, “Optimizing and Debugging
Your Code,” on page 575.)

■

You can also use some Dreamweaver coding tools in Design view, the visual design
environment. (See Chapter 22, “Editing Code in Design View,” on page 585.)

Setting up a web application
Many websites contain dynamic pages that allow visitors to view information stored in
databases, and usually allow some visitors to add new information and edit information in the
databases. To create such pages, you must first complete several preparatory steps.
■

Set up a web server and application server, then create or modify a Dreamweaver site. (See
Chapter 23, “Setting Up a Web Application,” on page 599.)

■

Connect to a database. (See “Connecting to a database” on page 609).

Creating dynamic pages
In Dreamweaver, you can define a variety of sources of dynamic content, including recordsets
extracted from databases, form parameters, and JavaBeans components. To add the dynamic
content to a page, simply drag it onto the page.
You can set your page to display one record or many records at a time, display more than one
page of records, add special links to move from one page of records to the next (and back),
and create record counters to help users keep track of the records.
■

If you’re unfamiliar with creating web applications in Dreamweaver, learn how to use
Dreamweaver to build dynamic pages. (See Chapter 30, “Optimizing the Workspace for
Visual Development,” on page 653 and Chapter 31, “The Workflow for Dynamic Page
Design,” on page 665.)

■

Define and display dynamic content on your pages. (See Chapter 32, “Obtaining Data for
Your Page,” on page 673, Chapter 33, “Defining Sources of Dynamic Content,” on
page 685, Chapter 34, “Adding Dynamic Content to Web Pages,” on page 707, and
Chapter 35, “Displaying Database Records,” on page 717.)

28

Introduction

■

Encapsulate application or business logic using leading-edge technologies such as
Macromedia ColdFusion components and web services. (See “Using ColdFusion
components” on page 884 and Chapter 37, “Using Web Services,” on page 765.)

■

If you need more flexibility, you can create your own server behaviors and interactive
forms. (See Chapter 38, “Adding Custom Server Behaviors,” on page 777 and Chapter 39,
“Creating Forms,” on page 799.)

Rapid application development
Dreamweaver offers a number of rapid application development (RAD) tools, including
server behaviors and application objects, that help you build sophisticated web applications
without having to write any server-side code.
■

Quickly create pages that search and modify databases and display the results. Provide
security by restricting access to your pages. (See “Building ColdFusion Applications
Rapidly” on page 821, “Building ASP.NET Applications Rapidly” on page 893, “Building
ASP and JSP Applications Rapidly” on page 935, and “Building PHP Applications
Rapidly” on page 957.)

Using Dreamweaver with other
applications
Dreamweaver accommodates your web design and development process by making it easy for
you to work with other applications. For information about working with other applications
such as browsers, HTML editors, image editors, and animation tools, see the following topics:
■

For information about using Dreamweaver with other HTML editors, such as HomeSite
or BBEdit, see “Using an external HTML editor with Dreamweaver” on page 545.

■

You can specify preferred browsers for previewing your site. (See “Previewing and testing
pages in browsers” on page 363.)

■

You can start an external image editor, such as Macromedia Fireworks or Adobe
Photoshop, from within Dreamweaver. (See “Using an external image editor”
on page 419.)

■

You can configure Dreamweaver to start a different editor for each file type. (See “Starting
an external editor for media files” on page 474.)

Using Dreamweaver with other applications

29

■

For information about adding interactivity to your site using Macromedia Flash, see
“Inserting and modifying a Flash button object” on page 476, “Inserting a Flash text
object” on page 479, or “Downloading and installing Flash elements” on page 480.

■

For information about using ColdFusion, see Using ColdFusion (Help > Using
ColdFusion).

Dreamweaver and accessibility
Accessibility refers to making websites and web products usable for people with visual,
auditory, motor, and other disabilities. Examples of accessibility features for software products
and websites include screen reader support, text equivalents for graphics, keyboard shortcuts,
change of display colors to high contrast, and so on.
NO TE

For more information about two significant accessibility initiatives, see the World Wide
Web Consortium Web Accessibility Initiative (www.w3.org/wai) and Section 508 of the
Federal Rehabilitation Act (www.section508.gov).

Dreamweaver provides tools that make the product accessible and tools that help you author
accessible content:
Using Dreamweaver accessibility features

For Dreamweaver web designers who need to
use accessibility features, Dreamweaver offers screen reader support, keyboard navigation, and
operating system accessibility support.
For more information, see “Using Dreamweaver accessibility features” on page 64.

Authoring for accessibility

For Dreamweaver web designers who need to create accessible
content, Dreamweaver assists you in creating accessible pages that contain useful content for
screen readers and comply with government guidelines.
Dreamweaver provides dialog boxes that prompt you to enter accessibility attributes when you
insert page elements (see “Optimizing the workspace for accessible page design” on page 69).
For example, the accessibility dialog box for images reminds you to add text equivalents for
graphics. Then, when the image appears on a page for a user with visual disabilities, the screen
reader reads the description.

30

Introduction

Dreamweaver also provides sample web pages that were designed for accessibility (see
“Creating a document based on a Dreamweaver design file” on page 93) and an accessibility
report that you can run to test your page or site against the Section 508 accessibility guidelines
(see “Testing your site” on page 154).
N OT E

Remember that no authoring tool can automate the development process. Designing
accessible websites requires you to understand accessibility requirements and make
many ongoing subjective decisions about how users with disabilities interact with web
pages. The best way to ensure that a website is accessible is through deliberate
planning, development, testing, and evaluation.

The Dreamweaver accessibility validation feature
The accessibility validation feature in Dreamweaver uses technology from UsableNet.
UsableNet is an industry leader in developing easy-to-use software to automate usability and
accessibility testing and repair. For additional assistance with accessibility testing, try the
UsableNet LIFT for Macromedia Dreamweaver, a complete solution for developing usable
and accessible websites. UsableNet LIFT for Macromedia Dreamweaver includes fix wizards
for complex tables, forms, and images; a global ALT editor; customizable reporting; and a new
active monitoring mode that ensures content is accessible as pages are being built. Request a
demo of LIFT for Macromedia Dreamweaver at www.usablenet.com.

Guide to Dreamweaver instructional
media
Dreamweaver includes a variety of media to help you learn the program quickly and become
proficient in creating web pages. The Dreamweaver Help system includes several documents
that help you learn about Dreamweaver, Dreamweaver Extensibility, and ColdFusion. There
are also a number of additional online resources that you can consult as you learn how to
build web pages.

Accessing the Dreamweaver documentation
The following table summarizes the documentation included in the Dreamweaver Help
system.

Guide to Dreamweaver instructional media

31

You can purchase printed versions of select titles. For more information, see
www.macromedia.com/go/buy_books.
Title

Description/
Audience

Where to Find It

Getting Started
Provides a basic • View in Dreamweaver: Select
Help > Getting Started with
with Dreamweaver introduction to
Dreamweaver
Dreamweaver
concepts and the • View online: http://
livedocs.macromedia.com/go/
interface, with
livedocs_dreamweaver/
detailed beginner
• Get the PDF:
tutorials. Intended
www.macromedia.com/go/
for beginning
dw_documentation
users, as well as
intermediate and
advanced users
who might want to
learn about new
features.
Using
Dreamweaver

• View in Dreamweaver: Select
Comprehensive
Help > Dreamweaver Help, or
information about
Help > Using Dreamweaver
all Dreamweaver
•
View online: http://
features. Intended
livedocs.macromedia.com/go/
for all
livedocs_dreamweaver/
Dreamweaver
•
Get the PDF:
users.
www.macromedia.com/go/
dw_documentation

Extending
Dreamweaver

• View in Dreamweaver: Select
Describes the
Help > Extending Dreamweaver
Dreamweaver
• View online: http://
framework and
livedocs.macromedia.com/go/
application
livedocs_dreamweaver/
programming
•
Get the PDF:
interface (API).
www.macromedia.com/go/
Intended for
dw_documentation
advanced users
who want to build
extensions or
customize the
Dreamweaver
interface.

32

Introduction

Title

Description/
Audience

Where to Find It

• View in Dreamweaver: Select
Dreamweaver API Describes the
Help > Dreamweaver API
Reference
utility API and the
Reference
JavaScript API,
both of which let • View online: http://
livedocs.macromedia.com/go/
you perform
livedocs_dreamweaver/
various
• Get the PDF:
supporting tasks
www.macromedia.com/go/
when developing
dw_documentation
Dreamweaver
extensions.
Intended for
advanced users
who want to build
extensions or
customize the
Dreamweaver
interface.

Guide to Dreamweaver instructional media

33

Title

Description/
Audience

Where to Find It

• View in Dreamweaver: Select
Using ColdFusion Includes a
Help > Using ColdFusion
selection of the
• View online: http://
most important
livedocs.macromedia.com/go/
books in the
livedocs_coldfusion/
ColdFusion
•
Get the PDF:
documentation
www.macromedia.com/go/
set. (The full set is
cf_documentation
available on
LiveDocs.)
Intended for
anyone interested
in ColdFusion,
from beginners to
advanced
developers.
Reference

34

Introduction

• View in Dreamweaver: Select
Includes many
Help > Reference. For a full list of
kinds of reference
manuals, click the Book pop-up
manuals about
menu in the Reference panel.
HTML, server
models, and other
topics, mainly
published by
O’Reilly. Intended
for anyone
needing more
information about
coding syntax,
concepts, and so
on.

Accessing additional online Dreamweaver resources
The following table summarizes additional online resources for learning Dreamweaver.
Resource

Description/
Audience

Where to Find It

Dreamweaver
Support Center

TechNotes,
support, and
problem-solving
information for
Dreamweaver
users.

www.macromedia.com/go/
dreamweaver_support

Dreamweaver
Articles and
www.macromedia.com/go/
Developer Center tutorials to help
dreamweaver_devcenter
you improve your
skills and learn
new ones.
Dreamweaver
Documentation
Resource Center

Get product
manuals in PDF
format, errata,
tutorials, and
release notes.

www.macromedia.com/go/
dw_documentation

Macromedia
Online Forums

Discussion and
problem-solving
information by
Dreamweaver
users, technical
support
representatives,
and the
Dreamweaver
development
team.

www.macromedia.com/go/
dreamweaver_newsgroup

Macromedia
Training

Courses featuring www.macromedia.com/go/
hands-on tasks
dreamweaver_training
and real-world
scenarios.

To get the most out of the Dreamweaver resources, see “Where to start” on page 21.

Guide to Dreamweaver instructional media

35

Typographical conventions
The following typographical conventions are used in this guide:
■

Menu items are shown in this format: menu name > menu item name. Items in submenus
are shown in this format: menu name > submenu name > menu item name.

■

Code font

■

Italic code font

■

Bold roman text indicates text for you to enter verbatim.

indicates HTML tag and attribute names as well as literal text
used in examples.
indicates replaceable items (sometimes called metasymbols) in code.

For a complete list of Dreamweaver resources, see “Guide to Dreamweaver instructional
media” on page 31.

HTML and web technologies resources
The following are some useful resources available on the web:
NO TE

For a list of Dreamweaver resources, see “Guide to Dreamweaver instructional media”
on page 31.

Cascading Style Sheets, Level 1 specification (CSS1) (www.w3.org/TR/REC-CSS1)

and
Level 2 specification (CSS2) (www.w3.org/TR/REC-CSS2/) are the official specifications
for style sheets from the World Wide Web Consortium.
HTML 4.01 specification (www.w3.org/TR/REC-html40/)

is the official specification for

HTML from the World Wide Web Consortium.
Index DOT HTML (www.blooberry.com/indexdot/html/)

is a comprehensive listing of
HTML tags, attributes, and values, as well as their compatibility with the various browsers.

XHTML 1.0 specification

(www.w3.org/TR/xhtml1/) is the official specification for
Extensible Hypertext Markup Language.

O’Reilly XML.com site (www.xml.com/) provides information, tutorials, and tips about
Extensible Markup Language (XML), as well as other web technologies.
xFront site

(www.xfront.com/rescuing-xslt.html) provides an introduction to XSL
transformations for new users.

Microsoft ASP Overview pages (http://msdn.microsoft.com/library/en-us/dnasp/html/
ASPover.asp) provide information about Active Server Pages (ASP).
Microsoft ASP.NET page (http://msdn.microsoft.com/asp.net/) provides information about

ASP.NET.

36

Introduction

Sun JSP page (http://java.sun.com/products/jsp/)

provides information about JavaServer

Pages (JSP).
PHP website (www.php.net/)
MySQL site

provides information about PHP.

(www.mysql.com/) provides information about MySQL.

Entities Table

(www.bbsinc.com/iso8859.html) lists the entity names used in ISO 8859-1

(Latin-1).
Macromedia ColdFusion product page (www.macromedia.com/go/coldfusion/)

provides

information about ColdFusion.
Macromedia JRun Server product page (www.macromedia.com/go/jrun/)

provides

information about the JRun Java application server.
Web Services Demystified

(www.sitepoint.com/article/692) explains what web services are

and how they work.
JavaScript Bible,

by Danny Goodman (IDG Books), comprehensively covers the
JavaScript 1.2 language.

JavaScript: The Definitive Guide, by David Flanagan (O’Reilly & Associates), provides
reference information for every JavaScript function, object, method, property, and event
handler.
CGI Resource Index (www.cgi-resources.com/)

is a repository of all things related to CGI,
including ready-made scripts, documentation, books, and even programmers for hire.

Common Gateway Interface site (http://hoohoo.ncsa.uiuc.edu/cgi/)

includes an

introduction to CGI.

HTML and web technologies resources

37

38

Introduction

1

CHAPTER 1

Exploring the Workspace
To get the most out of your Macromedia Dreamweaver 8 experience, you should understand
the basic concepts behind the Dreamweaver workspace and how to select options, use
inspectors and panels, and set preferences that fit your work style best.
This chapter contains the following sections:
About the Dreamweaver workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Working in the Document window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Using toolbars, inspectors, and context menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Using panels and panel groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Using Dreamweaver accessibility features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Optimizing the workspace for accessible page design . . . . . . . . . . . . . . . . . . . . . . . . 69
Using visual guides in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
Dreamweaver customizing basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71

Related topics
■
“Optimizing the Workspace for Visual Development” on page 653

About the Dreamweaver workspace
The Dreamweaver workspace enables you to view documents and object properties. The
workspace also places many of the most common operations in toolbars so that you can
quickly make changes to your documents.

39

The workspace layout
In Windows, Dreamweaver provides an all-in-one-window integrated layout. In the
integrated workspace, all windows and panels are integrated into a single larger application
window.
Insert bar
Document toolbar

Tag selector
NO T E
40

Document window

Property inspector

Panel groups

Files panel

The Windows workspace also has a Coder option, which docks the panel groups on the
left side and displays the Document window in Code view by default. For more
information, see “Using the coder-oriented workspace (Windows only)” on page 533.
To use this option, see “Choosing the workspace layout (Windows only)” on page 72.

Exploring the Workspace

On the Macintosh, Dreamweaver can display multiple documents in a single window with
tabs that identify each document. Dreamweaver can also display a floating workspace in
which each document appears in its own individual window. Panel groups are initially docked
together, but can be undocked into their own windows. Windows “snap” automatically to
each other, to the sides of the screen, and to the Document window as you drag or resize
them.

Insert bar

Tag selector

Document toolbar
Document window

Panel groups

Property inspector

Files panel

You can switch between different layouts in both Windows and Macintosh. For more
information, see “Choosing the workspace layout (Windows only)” on page 72, and
“Displaying tabbed documents (Macintosh)” on page 72.
Related topics
“Dreamweaver workspace elements” on page 42

■
■

“Using toolbars, inspectors, and context menus” on page 54

■

“Using panels and panel groups” on page 61.

About the Dreamweaver workspace

41

Dreamweaver workspace elements
This section briefly describes some elements of the Dreamweaver workspace.
N OT E

Dreamweaver provides many other panels, inspectors, and windows. To open
Dreamweaver panels, inspectors, and windows, use the Window menu. If you can’t find
a panel, inspector, or window that’s marked as open, select Window > Arrange Panels to
neatly lay out all open panels.

The Start page enables you to open a recent document or create a new document. From the
Start page you can also learn more about Dreamweaver by taking a product tour or a tutorial.
The Insert bar contains buttons for inserting various types of “objects,” such as images, tables,
and layers, into a document. Each object is a piece of HTML code that enables you to set
various attributes as you insert it. For example, you can insert a table by clicking the Table
button in the Insert bar. If you prefer, you can insert objects using the Insert menu instead of
the Insert bar.
The Document toolbar

contains buttons that provide options for different views of the
Document window (such as Design view and Code view), various viewing options, and some
common operations such as previewing in a browser.

The Standard toolbar (not displayed in the default workspace layout) contains buttons for
common operations from the File and Edit menus: New, Open, Save, Save All, Cut, Copy,
Paste, Undo, and Redo. To display the Standard toolbar, select View > Toolbars > Standard.
The Coding toolbar (displayed in Code view only) contains buttons that let you perform
many standard coding operations.
The Style Rendering toolbar (hidden

by default) contains buttons that let you see how your
design would look in different media types if you used media-dependent style sheets. It also
contains a button that lets you enable or disable CSS styles.
The Document window

displays the current document as you create and edit it.

The Property inspector lets you view and change a variety of properties for the selected
object or text. Each kind of object has different properties. The Property inspector is not
expanded by default in the Coder workspace layout.
The tag selector

in the status bar at the bottom of the Document window shows the
hierarchy of tags surrounding the current selection. Click any tag in the hierarchy to select
that tag and all its contents.
Panel groups are sets of related panels grouped together under one heading. To expand a
panel group, click the expander arrow at the left of the group’s name; to undock a panel
group, drag the gripper at the left edge of the group’s title bar.

42

Exploring the Workspace

The Files panel

enables you to manage your files and folders, whether they are part of a
Dreamweaver site or on a remote server. The Files panel also enables you to access all the files
on your local disk, much like Windows Explorer (Windows) or the Finder (Macintosh).
Related topics
“Working in the Document window” on page 51

■
■

“Using toolbars, inspectors, and context menus” on page 54

■

“Using panels and panel groups” on page 61

■

“Managing files and folders in the Files panel” on page 119

The Document window
The Document window shows the current document. You can select any of the following
views:
Design view

is a design environment for visual page layout, visual editing, and rapid
application development. In this view, Dreamweaver displays a fully editable, visual
representation of the document, similar to what you would see viewing the page in a browser.
You can configure the Design view to display dynamic content while you’re working on the
document (see “Viewing live data in Design view” on page 656).

Code view

is a hand-coding environment for writing and editing HTML, JavaScript,
server-language code—such PHP or ColdFusion Markup Language (CFML)—and any other
kind of code. For more information, see Chapter 20, “Coding in Dreamweaver,” on page 549.
Code and Design view

enables you to see both Code view and Design view for the same
document in a single window.
When the Document window has a title bar, the title bar displays the page title and, in
parentheses, the file’s path and filename. After the filename, Dreamweaver displays an asterisk
if you’ve made changes that you haven’t saved yet.
When the Document window is maximized in the integrated workspace layout (Windows
only), it has no title bar; in that case the page title and the file’s path and filename appear in
the title bar of the main workspace window.
When a Document window is maximized, tabs appear at the top of the Document window
area showing the filenames of all open documents. To switch to a document, click its tab.
Related topics
“Working in the Document window” on page 51

■

About the Dreamweaver workspace

43

The Document toolbar
The Document toolbar contains buttons that let you toggle between different views of your
document quickly: Code, Design, and a split view that shows both Code and Design view.
The toolbar also contains some common commands and options related to viewing the
document and transferring it between the local and remote sites.
Show Code View
Show Code and Design Views
Show Design View

No Browser/Check Errors
Validate Markup
File Management

Server Debug
Document Title

Visual Aids
View Options
Refresh Design View
Preview/Debug in Browser

The following options appear in the Document toolbar:
Show Code View

displays only the Code view in the Document window.

Show Code and Design Views displays Code view in part of the Document window and
Design view in another part. When you select this combined view, the option Design View on
Top becomes available in the View Options menu. Use this option to specify which view
appears at the top of your Document window.
Show Design View

displays only the Design view in the Document window.

Server Debug displays a report to help you debug the current ColdFusion page. The report
includes errors, if any, in your page.
Document Title allows you to enter a title for your document, to be displayed in the browser’s
title bar. If your document already has a title, it appears in this field.
No Browser/Check Errors enables
Validate Markup

you to check cross-browser compatibility.

lets you validate the current document or a selected tag.

File Management

displays the File Management pop-up menu.

Preview/Debug in Browser allows you to preview or debug your document in a browser.
Select a browser from the pop-up menu.
Refresh Design View

refreshes the document’s Design view after you make changes in Code
view. Changes you make in Code view don’t automatically appear in Design view until you
perform certain actions, such as saving the file or clicking this button.

44

Exploring the Workspace

View Options allows you to set options for Code view and Design view, including which view
should appear above the other. Options in the menu are for the current view: Design view,
Code view, or both. For information about Code view options, see “Setting coding
preferences” on page 533. For information about Design view options, see “Selecting
elements in the Document window” on page 351, “Viewing and editing head content”
on page 595, and “Using visual guides in Dreamweaver” on page 71.
Visual Aids lets

you use different visual aids to design your pages.

Related topics
■
“Displaying toolbars” on page 54

The Standard toolbar
The Standard toolbar contains buttons for common operations from the File and Edit menus:
New, Open, Save, Save All, Cut, Copy, Paste, Undo, and Redo. Use these buttons just as you
would use the equivalent menu commands.
For more information about operations such as Open and Save, see Chapter 3, “Creating and
Opening Documents,” on page 91.
Related topics
■
“Displaying toolbars” on page 54

The status bar
The status bar at the bottom of the Document window provides additional information about
the document you are creating.
Document size and
estimated download time

Tag selector

Window Size pop-up menu
Set magnification
Zoom tool
Hand tool
Select tool

About the Dreamweaver workspace

45

The tag selector shows the hierarchy of tags surrounding the current selection. Click any tag
in the hierarchy to select that tag and all its contents. Click  to select the entire body of
the document. To set the class or id attributes for a tag in the tag selector, right-click
(Windows) or Control-click (Macintosh) the tag and select a class or ID from the context
menu.
The Hand tool lets you click the document and drag it in the Document window. Click the
Select tool to disable the Hand tool.
The Zoom tool and Set Magnification pop-up menu let you set a magnification level for your
document. For more information, see “Zooming in and out” on page 354.
The Window Size pop-up menu (visible in Design view only) lets you resize the Document
window to predetermined or custom dimensions. For more information, see “Resizing the
Document window” on page 52.
To the right of the Window Size pop-up menu are the estimated document size and estimated
download time for the page, including all dependent files such as images and other media
files. For more information, see “Setting download time and size preferences” on page 366.
Related topics
■
“Setting Status Bar preferences” on page 53

The Insert bar
The Insert bar contains buttons for creating and inserting objects such as tables, layers, and
images. When you roll the pointer over a button, a tooltip appears with the name of the
button.
The buttons are organized into several categories, which you can switch on the left side of the
Insert bar. Additional categories appear when the current document contains server code,
such as ASP or CFML documents. When you start Dreamweaver, the category you were last
working in opens.
N OT E
46

If you prefer to view the categories as tabs across the top of the Insert bar, you can
change the layout of the Insert bar (see “Setting Fonts preferences for Dreamweaver
display” on page 75).

Exploring the Workspace

Some categories have buttons with pop-up menus. When you select an option from a pop-up
menu, it becomes the default action for the button. For example, if you select Image
Placeholder from the Image button’s pop-up menu, the next time you click the Image button,
Dreamweaver inserts an image placeholder. Anytime you select a new option from the pop-up
menu, the default action for the button changes.
The Insert bar is organized in the following categories:
The Common category enables you to create and insert the most commonly used objects,
such as images and tables.
The Layout category enables

you to insert tables, div tags, layers, and frames. You can also
you choose among three views of tables: Standard (default), Expanded Tables, and Layout.
When Layout mode is selected, you can use the Dreamweaver layout tools: Draw Layout Cell
and Draw Layout Table.

The Forms category contains
The Text category enables
em, p, h1,

buttons for creating forms and inserting form elements.

you to insert a variety of text- and list-formatting tags, such as b,

and ul.

The HTML category enables

you to insert HTML tags for horizontal rules, head content,

tables, frames, and scripts.
Server-code categories are

available only for pages that use a particular server language,
including ASP, ASP.NET, CFML Basic, CFML Flow, CFML Advanced, JSP, and PHP. Each
of these categories provides server-code objects that you can insert in Code view.

The Application category enables

you to insert dynamic elements such as recordsets,
repeated regions, and record insertion and update forms.

The Flash elements category enables

you to insert Macromedia Flash elements.

The Favorites category enables you to group and organize the Insert bar buttons you use the

most in one common place.
You can modify any object in the Insert bar or create your own objects (see “Customizing
Dreamweaver” on the Macromedia Support Center at www.macromedia.com/go/
customizing_dreamweaver).
Related topics
■
“Using the Insert bar” on page 55

About the Dreamweaver workspace

47

The Coding toolbar
The Coding toolbar contains buttons that let you perform many standard coding operations,
such as collapsing and expanding code selections, highlighting invalid code, applying and
removing comments, indenting code, and inserting recently used code snippets. The Coding
toolbar is visible only in Code view and appears vertically on the left side of the Document
window.

You cannot undock or move the Coding toolbar, but you can hide it. For more information,
see “Displaying toolbars” on page 54.
You can also edit the Coding toolbar to display more buttons (such as Word Wrap, Show
Hidden Characters, and Auto Indent), or hide buttons that you don’t want to use. To do so,
however, you must edit the XML file that generates the toolbar. For more information, see
Extending Dreamweaver.
Related topics
“Inserting code quickly with the Coding toolbar” on page 561

■
■

48

“Displaying toolbars” on page 54

Exploring the Workspace

The Style Rendering toolbar
The Style Rendering toolbar (hidden by default) contains buttons that let you see how your
design would look in different media types if you use media-dependent style sheets. It also
contains a button that lets you enable or disable CSS styles. To display the toolbar, select
View > Toolbars > Style Rendering.

This toolbar only works if your documents use media-dependent style sheets. For example,
your style sheet might specify a body rule for print and a different body rule for handheld
devices. For more information on creating media-dependent style sheets, see the World Wide
Web Consortium website at www.w3.org/TR/CSS21/media.html.
By default, Dreamweaver displays your design for the screen media type (which shows you
how a page is rendered on a computer screen). You can view the following media type
renderings by clicking the respective buttons in the Style Rendering toolbar.
Render Screen Media Type shows
Render Print Media Type

you how the page appears on a computer screen.

shows you how the page appears on a printed piece of paper.

Render Handheld Media Type shows

you how the page appears on a handheld device, such
as a mobile phone or a BlackBerry device.

Render Projection Media Type shows
Render TTY Media Type shows
Render TV Media Type shows

you how the page appears on a projection device.

you how the page appears on a teletype machine.

you how the page appears on a television screen.

Toggle Displaying of CSS Styles lets you enable or disable CSS styles. This button works
independently of the other media buttons.

Related topics
■
“Displaying toolbars” on page 54

Reports in Dreamweaver
You can run reports in Dreamweaver to find content, troubleshoot, or test content. You can
generate the following types of reports:
Search enables you to search for tags, attributes, and specific text within tags. To search your
code, see “Searching and replacing tags and attributes” on page 570.
Validation enables you to check for code or syntax errors. To validate your code, see
“Validating your tags” on page 580.

About the Dreamweaver workspace

49

Target Browser Check enables you to test the HTML in your documents to see if any tags or
attributes are unsupported by your target browsers. To run a target browser check, see
“Checking for browser compatibility” on page 577.
Link Checker enables you to find and fix broken, external, and orphaned links. To run the
link checker, see “Checking for broken, external, and orphaned links” on page 449.
Site Reports enable you to improve workflow and test HTML attributes in your site.
Workflow reports include checked out by, recently modified, and design notes; HTML
reports include combinable nested font tags, accessibility, missing Alt text, redundant nested
tags, removable empty tags, and untitled documents. To run site reports, see “Testing your
site” on page 154.
FTP Log

enables you view all FTP file transfer activity. To view the FTP log, see “Getting
files from a remote server” on page 140 or “Putting files on a remote server” on page 142.

Server Debug enables you to view information to debug a ColdFusion application. To view
debugging information, see “Using the ColdFusion debugger (Windows only)” on page 582.

About customizing Dreamweaver in multiuser
systems
You can customize Dreamweaver to suit your needs even in a multiuser operating system such
as Windows XP or Mac OS X.
Dreamweaver prevents any user’s customized configuration from affecting any other user’s
customized configuration. To accomplish this goal, the first time you run Dreamweaver in
one of the multiuser operating systems that it recognizes, the application creates copies of a
variety of configuration files for you. These user configuration files are stored in a folder
belonging to you.
For example, in Windows XP they’re stored in C:\Documents and
Settings\username\Application Data\Macromedia\Dreamweaver 8\Configuration (which may
be inside a hidden folder).
In Mac OS X they’re stored inside your Home folder; specifically, in Users/username/Library/
Application Support/Macromedia/Dreamweaver 8/Configuration.
If you reinstall or upgrade Dreamweaver, Dreamweaver automatically makes backup copies of
existing user configuration files, so that if you’ve customized those files by hand, you still have
access to the changes you made.
Related topics
■
“Dreamweaver customizing basics”

50

Exploring the Workspace

Working in the Document window
The Document window shows the current document. You can view a document in Design
view, Code view, or Code and Design views. The Document window’s status bar provides
information about the current document.
Related topics
■
“The Document window” on page 43
■

“The status bar” on page 45

Switching between views in the Document window
You can view a document in the Document window in Code view, Design view, or Code and
Design views.
To switch views in the Document window, do one of the following:
■

■

Use the View menu:
■

Select View > Code.

■

Select View > Design.

■

Select View > Code and Design.

Use the Document toolbar:
■

Click the Show Code View button.

■

Click the Show Code and Design Views button.

■

Click the Show Design View button.

To toggle between Code view and Design view:
■

Press Control+tilde (~) (Windows) or Command+backquote (‘) (Macintosh).
NO T E

If both views are showing in the Document window, this keyboard shortcut changes
keyboard focus from one view to the other.

Related topics
■
“The Document window” on page 43

Working in the Document window

51

Cascading or tiling Document windows
If you have many documents open at once, you can cascade or tile them.
To cascade Document windows, do the following:
■

Select Window > Cascade.

To tile Documents windows, do one of the following:
■

In Windows, select Window > Tile Horizontally or Window > Tile Vertically.

■

On the Macintosh, select Window > Tile.

Related topics
■
“Choosing the workspace layout (Windows only)” on page 72
■

“Displaying tabbed documents (Macintosh)” on page 72

■

“Saving custom workspace layouts” on page 73

Resizing the Document window
The status bar displays the Document window’s current dimensions (in pixels). To design a
page that looks its best at a specific size, you can adjust the Document window to any of the
predetermined sizes, edit those predetermined sizes, or create new sizes.
To resize the Document window to a predetermined size:
■

Select one of the sizes from the Window Size pop-up menu at the bottom of the
Document window.
N OT E

52

In Windows, you can maximize a Document window so that it fills the entire
document area of the integrated window. You can’t resize a Document window when
it is maximized.

Exploring the Workspace

The window size shown reflects the inside dimensions of the browser window, without
borders; the monitor size is listed in parentheses. For example, you would use the size “536 x
196 (640 x 480, Default)” if your visitors are likely to be using Microsoft Internet Explorer or
Netscape Navigator in their default configurations on a 640 x 480 monitor.
TIP

For less precise resizing, use your operating system’s standard methods of resizing
windows, such as dragging the lower-right corner of a window.

To change the values listed in the Window Size pop-up menu:
1.

Select Edit Sizes from the Window Size pop-up menu.

2.

Click any of the width or height values in the Window Sizes list, then type a new value.
To make the Document window adjust only to a specific width (leaving the height
unchanged), select a height value and delete it.

3.

Click the Description text box to enter descriptive text about a specific size.

4.

Click OK to save the change and return to the Document window.

To add a new size to the Window Size pop-up menu:
1.

Select Edit Sizes from the Window Size pop-up menu.

2.

Click the blank space below the last value in the Width column.

3.

Enter values for Width and Height.
To set the Width or Height only, simply leave one field empty.

4.

Click the Description field to enter descriptive text about the size you added.

5.

Click OK to save the change and return to the Document window.
For example, you might type SVGA or average PC next to the entry for an 800 x 600
pixel monitor, and 17-in. Mac next to the entry for an 832 x 624 pixel monitor. Most
monitors can be adjusted to a variety of pixel dimensions.

Setting Status Bar preferences
Set preferences for the status bar using the Preferences dialog box.
To set preferences for the status bar:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears.

2.

Select Status Bar from the Category list on the left.

Working in the Document window

53

3.

Set preference options.
For more information, click the Help button in the dialog box.

4.

Click OK.

Related topics
■
“The status bar” on page 45

Using toolbars, inspectors, and context
menus
Dreamweaver contains several tools that enable you to quickly make changes as you create or
edit a document.
The Document, Standard, and Coding toolbars are for editing and working with the current
document. The Insert bar contains buttons for creating and inserting objects such as tables,
layers, and images, while the Property inspector enables you to edit properties for those
objects.
NO TE

You can also use the Tag inspector to view and edit properties (see “Changing attributes
with the Tag inspector” on page 586). The Tag inspector enables you to view and edit
every attribute associated with a given tag, while the Property inspector shows only the
most common attributes.

Context menus give you an alternative to the Insert bar and Property inspector for creating
and editing objects.

Displaying toolbars
Use the Document and Standard toolbars to perform document-related and standard editing
operations; use the Coding toolbar to insert code quickly; and use the Style Rendering toolbar
to display your page as it would appear in different media types. You can choose to display or
hide the toolbars as necessary.

54

Exploring the Workspace

To display or hide a toolbar, do one of the following:
■

Select View > Toolbars, and then select the toolbar.

■

Right-click (Windows) or Control-click (Macintosh) any of the toolbars and select the
toolbar from the context menu.
NO T E

To display or hide the Coding toolbar in the Code inspector (Window > Code
Inspector), select Coding Toolbar from the View Options pop-up menu at the top of
the inspector.

Related topics
■
“The Document toolbar” on page 44
■

“The Standard toolbar” on page 45

■

“The Coding toolbar” on page 48

■

“The Style Rendering toolbar” on page 49

Using the Insert bar
The Insert bar contains buttons for creating and inserting objects such as tables and images.
The buttons are organized into categories. When you roll the pointer over a button, a tooltip
appears with the name of the button.
Related topics
■
“The Insert bar” on page 46

Displaying the Insert bar and its categories and menus
You can hide or show, and collapse or expand the Insert bar as necessary. You can also display
the different categories of the Insert bar. Some categories of the Insert bar have buttons that
contain menus with common commands.
If you prefer to view the categories as tabs across the top of the Insert bar, you can change the
layout of the Insert bar.
To hide or show the Insert bar, do either of the following:
■

Select Window > Insert.

■

Right-click (Windows) or Control-click (Macintosh) in the Insert bar or the Document,
Standard, or Coding toolbar, and then select Insert Bar.

Using toolbars, inspectors, and context menus

55

To show the buttons in a particular category:
■

Click the arrow beside the category name on the left end of the Insert bar, and then select
another category from the pop-up menu.

To display the pop-up menu for a button:
■

Click the down arrow beside the button’s icon.

To show Insert bar categories as tabs:
■

Click the arrow beside the category name on the left end of the Insert bar, and then select
Show as Tabs.

The Insert bar displays the categories as tabs across the top of the Insert bar.
NO T E

You might need to click the Insert bar title bar to reopen the Insert bar.

To show Insert bar categories as a menu:
■

Right-click (Windows) or Control-click (Macintosh) in the Insert bar, and then select
Show as Menus.

The Insert bar displays the categories in a menu instead of tabs.
Related topics
■
“Customizing and using the Favorites category in the Insert bar” on page 58

56

Exploring the Workspace

Using the Insert bar to insert objects
The Insert bar is a convenient method for creating and inserting objects.
To insert an object:
1.

Select the appropriate category from the left side of the Insert bar.

2.

Do one of the following:
■

Click an object button or drag the button’s icon into the Document window.

■

Click the arrow on a button, then select an option from the menu.

Depending on the object, a corresponding object-insertion dialog box may appear, prompting
you to browse to a file or specify parameters for an object. Or, Dreamweaver may insert code
into the document, or open a tag editor (see “Editing tags with Tag editors” on page 564) or
panel for you to specify information before the code is inserted.
For some objects, no dialog box appears if you insert the object in Design view, but a tag
editor appears if you insert the object in Code view. For a few objects, inserting the object in
Design view causes Dreamweaver to switch to Code view before inserting the object.
NO TE

Some objects, such as named anchors, are not visible when the page is viewed in a
browser window. To display icons in Design view that mark the locations of such invisible
objects, see “Showing and hiding invisible elements” on page 353.

To bypass the object-insertion dialog box and insert an empty placeholder
object:
■

Control-click (Windows) or Option-click (Macintosh) the button for the object.
For example, to insert a placeholder for an image without specifying an image file,
Control-click or Option-click the Image button.
N OT E

This procedure does not bypass all object-insertion dialog boxes. Many objects,
including navigation bars, layers, Flash buttons, and framesets, do not insert
placeholders or default-valued objects.

To modify preferences for the Insert bar:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box displays the General preferences category.

Using toolbars, inspectors, and context menus

57

2.

Deselect Show Dialog When Inserting Objects to suppress dialog boxes when you insert
objects such as images, tables, scripts, and head elements or by holding down the Control
key (Windows) or the Option key (Macintosh) while creating the object.
TI P

3.

When you insert an object with this option off, the object is given default attribute
values. Use the Property inspector to change object properties after inserting the
object.

Click OK.

Related topics
■
“Displaying the Insert bar and its categories and menus” on page 55

Customizing and using the Favorites category in the Insert bar
The Favorites category of the Insert bar enables you to group and organize commonly used
Insert bar buttons. You can add, manage, and delete buttons from the Favorites category.
To add, delete, or manage items in the Favorites category:
1.

Select any category in the Insert bar.

2.

Right-click (Windows) or Control-click (Macintosh) in the area where the buttons appear
(do not right-click in the category name), and then select Customize Objects.
The Customize Favorite Objects dialog box appears.

3.

Make changes as necessary.
For more information, click the Help button in the dialog box.

4.

Click OK.
The Favorites category reflects the changes you made.
TI P

If you’re not in the Favorites category, select that category to see your changes.

To insert objects using buttons in the Favorites category:
■

Select the Favorites category from the left side of the Insert bar, then click the button for
any Favorites object you’ve added.
NO T E

The Favorites category does not contain any buttons until you customize Favorites
to add objects.

Related topics
■
“Displaying the Insert bar and its categories and menus” on page 55
■

58

“Using the Insert bar to insert objects” on page 57

Exploring the Workspace

Using the Property inspector
The Property inspector lets you examine and edit the most common properties for the
currently selected page element, such as text or an inserted object. The contents of the
Property inspector vary depending on the element selected.
NO TE

Use the Tag inspector to view and edit every attribute associated with a given tag
properties (see “Changing attributes with the Tag inspector” on page 586).

TIP

The Property inspector is at the bottom of the workspace by default, but you can dock it
at the top of the workspace if you want. Or, you can make it a floating panel in the
workspace. For more information about moving the Property inspector, see “Docking
and undocking panels and panel groups” on page 62.

To show or hide the Property inspector:
■

Select Window > Properties.

To expand or collapse the Property inspector:
■

Click the expander arrow in the lower-right corner of the Property inspector.

To view properties for a page element:
■

Select the page element in the Document window.
NO T E

You might need to expand the Property inspector to view all the properties for the
selected element.

To change properties for a page element:
1.

Select the page element in the Document window.

2.

Change any of the properties in the Property inspector.
N OT E

For information on specific properties, select an element in the Document window
and then click the Help icon in the upper-right corner of the Property inspector.

Most changes you make to properties are immediately applied in the Document window.

Using toolbars, inspectors, and context menus

59

3.

If your changes are not applied immediately, do one of the following:
■

Click outside the property-editing text fields.

■

Press Enter (Windows) or Return (Macintosh).

■

Press Tab to switch to another property.

Using context menus
Dreamweaver makes extensive use of context menus, which provide convenient access to the
most useful commands and properties related to the object or window you’re working with.
Context menus list only those commands that pertain to the current selection.
To use a context menu:
1.

Right-click (Windows) or Control-click (Macintosh) the object or window.
The context menu for the selected object or window appears.

2.

60

Select a command from the context menu.

Exploring the Workspace

Using panels and panel groups
Panels in Dreamweaver are grouped together into panel groups. The selected panel within a
panel group appears as a tab. Each panel group can be expanded or collapsed, and can be
docked or undocked with other panel groups.
Panel groups can also be docked to the integrated application window (Windows only). This
makes it easy to access the panels you need without cluttering your workspace.
NO T E

When a panel group is floating (undocked), a narrow blank bar appears at the top of the
panel group. In this documentation, the term “panel group’s title bar” refers to the area
where the panel group’s name appears, rather than to this narrow blank bar.

Viewing panels and panel groups
You can display or hide panel groups and panels in the workspace as necessary.
To expand or collapse a panel group, do one of the following:
■

Click the expander arrow on the left side of the panel group’s title bar.

■

Click the panel group’s title.

To close a panel group so that it isn’t visible on your screen:
■

Select Close Panel Group from the Options menu in the panel group’s title bar.
The panel group disappears from your screen.

To open a panel group or panel that isn’t visible on your screen:
■

Select the Window menu, then select a panel name from the menu.
A check mark next to an item in the Window menu indicates that the named item is
currently open (though it may be hidden behind other windows).
TIP

If you can’t find a panel, inspector, or window that’s marked as open, select Window
> Arrange Panels to neatly lay out all open panels.

To select a panel within an expanded panel group:
■

Click the panel’s name.

To see a panel group’s Options menu if it isn’t showing:
■

Expand the panel group by clicking its name or its expander arrow.

Using panels and panel groups

61

The Options menu is visible only when the panel group is expanded.
T IP

Some options are available in the panel group’s context menu even when the group
is collapsed; right-click (Windows) or Control-click (Macintosh) the panel group’s
title bar to view the context menu.

Docking and undocking panels and panel groups
You can move panels and panel groups as necessary, and arrange them so that they are floating
or docked in the workspace.
Most panels can be docked only to either the left or the right of the Document window area
in the integrated workspace, while others (such as the Property inspector and the Insert bar)
can be docked only to the top or bottom of the integrated window.
To undock a panel group:
■

Drag the panel group by its gripper (on the left side of the panel group’s title bar) until its
outline indicates that it’s no longer docked.

To dock a panel group to other panel groups (floating workspace) or to the
integrated window (Windows only):
■

Drag the panel group by its gripper until its outline indicates that it’s docked.

To undock a panel from a panel group:
■

Select Group With > New Panel Group from the Options menu in the panel group’s title
bar. (The Group With command’s name changes depending on the name of the active
panel.)
The panel appears in a new panel group of its own.

To dock a panel in a panel group:
■

62

Select the name of a panel group from the Group With submenu of the panel group’s
Options menu. (The Group With command’s name changes depending on the name of
the active panel.)

Exploring the Workspace

To drag a floating (undocked) panel group without docking it:
■

Drag the panel group by the bar above its title bar. The panel group doesn’t dock as long as
you don’t drag it by its gripper.

Resizing and renaming panel groups
You can change the size and name of panel groups depending on your needs.
To change the size of the panel groups:
■

For floating panels, drag to resize the set of panel groups just as you would drag to resize
any window in your operating system.
For example, you can drag the resize area at the lower-right corner of the set of panel
groups.

■

For docked panels, drag the splitter bar between the panels and the Document window.

To maximize a panel group, do one of the following:
■

Select Maximize Panel Group from the Options menu in the panel group’s title bar.

■

Double-click anywhere in the panel group’s title bar.
The panel group grows vertically to fill all of the available vertical space.

To rename a panel group:
1.

Select Rename Panel Group from the Options menu in the panel group’s title bar.

2.

Enter a new name, then click OK.

Saving panel groups
Dreamweaver lets you save and restore different panel groups so that you can customize your
workspace for different activities. When you save a workspace layout, Dreamweaver
remembers the panels in the specified layout, as well as other attributes such as the positions
and sizes of the panels, their collapsed or expanded states, the position and size of the
application window, and the position and size of the Document window.
For more information, see “Saving custom workspace layouts” on page 73.

Using panels and panel groups

63

Setting Panels preferences
You can set preferences to specify which panels and inspectors always appear in front of the
Document window, and which ones may be obscured by the Document window.
To set preferences for panels:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears.

2.

Select Panels from the Category list on the left.

3.

Select options.
For more information, click the Help button in the dialog box.

4.

Click OK.

Using Dreamweaver accessibility
features
Dreamweaver provides features that make it accessible to users with disabilities.
Specifically, Dreamweaver supports screen readers, operating system accessibility features,
and keyboard navigation.
Related topics
■
“Dreamweaver and accessibility” on page 30

Using screen readers with Dreamweaver
A screen reader recites text that appears on the computer screen. It also reads non-textual
information, such as button labels or image descriptions in the application, provided in
accessibility tags or attributes during authoring.
As a Dreamweaver user, you can use a screen reader to assist you in creating your web pages.
The screen reader starts reading in the upper-left corner of the Document window.
Dreamweaver supports JAWS for Windows, from Freedom Scientific
(www.freedomscientific.com), and Window-Eyes screen readers, from GW Micro
(www.gwmicro.com).
Related topics
“Using the keyboard to navigate Dreamweaver” on page 65

■

64

Exploring the Workspace

Support for operating system accessibility features
Dreamweaver supports accessibility features in both the Windows and Macintosh operating
systems. For example, on the Macintosh you set the visual preferences in the Universal Access
Preferences dialog box (Apple > System Preferences). Your settings are reflected in the
Dreamweaver workspace.
Dreamweaver also supports the Windows operating system’s high contrast setting. You
activate this option through the Windows Control Panel. When high contrast is on, it affects
Dreamweaver as follows:
■

Dialog boxes and panels use system color settings.
For example, if you set the color to White on Black, all Dreamweaver dialog boxes and
panels appear with a white foreground color and black background.

■

Code view syntax coloring is off.
Code view uses the system window and window text color, and ignores color settings in
Preferences. For example, if you set the system color to White on Black, and then change
text colors in Preferences > Code Coloring, Dreamweaver ignores the colors set in
Preferences and displays the code text with a white foreground color and black
background.

■

Design view uses the background and text colors you set in Modify > Page Properties so
that pages you design render colors as a browser will.

Related topics
■
“Using screen readers with Dreamweaver” on page 64

Using the keyboard to navigate Dreamweaver
You can use the keyboard to navigate Dreamweaver panels, inspectors, dialog boxes, frames,
and tables without a mouse.
Related topics
■
“Using screen readers with Dreamweaver” on page 64
■

“Support for operating system accessibility features” on page 65

Navigating panels
You can use the keyboard to navigate the panels.
N O TE

Tabbing and the use of arrow keys are supported for Windows only.

Using Dreamweaver accessibility features

65

To navigate panels:
1.

In the Document window, press Control+Alt+Tab to shift focus to a panel.
A white outline around the panel title bar indicates that focus is on that panel. The screen
reader reads the panel title bar that has focus.

2.

Press Control+Alt+Tab again to shift focus to the next panel.
Continue until you have focus on the panel you want to work in.

3.

Press Control+Alt+Shift+Tab to shift focus to the previous panel, if necessary.

4.

If the panel you want to work in is not open, use the keyboard shortcuts listed in the
Windows menu to display the appropriate panel; then press Control+Alt+Tab to shift
focus to that panel.
If the panel you want to work in is open, but not expanded, place focus on the panel title
bar, and then press the Spacebar. Press the Spacebar again to collapse the panel.

5.

Press the Tab key to move through the options in the panel.
A dotted outline around the option indicates that focus is on that option.

6.

Use the arrow keys as appropriate:
■

■

If an option has choices, use the arrow keys to scroll through the choices, and then
press the Spacebar to make a selection.
If there are tabs in the panel group to open other panels, place focus on the open tab,
and then use the left or right arrow key to open another tabs. Once you open a new
tab, press the Tab key to move through the options in that panel.

Related topics
■
“Navigating dialog boxes” on page 67
■

“Navigating frames” on page 68

■

“Navigating tables” on page 68

Navigating the Property inspector
You can use the keyboard to navigate the Property inspector and make changes to your
document.
NO T E
66

The use of arrow keys is supported for Windows only.

Exploring the Workspace

To navigate the Property inspector:
1.

Press Control+F3 (Windows) or Command+F3 (Macintosh) to display the Property
inspector, if it is not visible.

2.

(Windows) Press Control+Alt+Tab until you shift focus to the Property inspector.

3.

Press the Tab key to move through the Property inspector options.

4.

(Windows) Use the arrow keys as appropriate to move through option choices.

5.

Press Control+Tab (Windows) or Option+Tab (Macintosh) to open and close the
expanded section of the Property inspector, as necessary, or, with focus on the expander
arrow at the lower right, press the Spacebar.

Related topics
■
“Navigating panels” on page 65
■

“Navigating frames” on page 68

■

“Navigating tables” on page 68

Navigating dialog boxes
You can use the keyboard to navigate dialog boxes.
N OT E

The use of arrow keys is supported for Windows only.

To navigate a dialog box:
1.

Press the Tab key to move through the options in a dialog box.

2.

(Windows) Use the arrow keys to move through choices for an option.
For example, if an option has a pop-up menu, move focus to that option, and then use the
down arrow to move through the choices.

3.

If the dialog box has a Category list, press Control+Tab (Windows) or Option+Tab
(Macintosh) to shift focus to the category list, and then use the arrow keys to move up or
down the list.

4.

Press Control+Tab (Windows) or Option+Tab (Macintosh) again to shift to the options
for a category.

5.

Press Enter (Windows) or Return (Macintosh) to exit the dialog box.

Using Dreamweaver accessibility features

67

Related topics
■
“Navigating panels” on page 65
■

“Navigating the Property inspector” on page 66

■

“Navigating tables” on page 68

Navigating frames
If your document contains frames, you can use the arrow keys to shift focus to a frame.
NO T E

The use of arrow keys is supported for Windows only.

To select a frame:
1.

Place the insertion point in the Document window.

2.

Press Alt+Up Arrow to select the frame that currently has focus.
A dotted line indicates the frame that has focus.

3.

Continue pressing Alt+Up Arrow to shift focus to the frameset, and then parent framesets,
if there are nested framesets.

4.

Press Alt+Down Arrow to shift focus to a child frameset or a single frame within the
frameset.

5.

With focus on a single frame, press Alt+Left or Right Arrow to move between frames.

6.

Press Alt+Down Arrow to place the insertion point in the Document window.

Related topics
■
“Navigating panels” on page 65
■

“Navigating the Property inspector” on page 66

■

“Navigating dialog boxes” on page 67

Navigating tables
After you select a table, you can use the keyboard to navigate through it.
To navigate a table:
1.

Use the arrow keys or press Tab to move to other cells in a table as necessary.
TIP

2.

68

Pressing Tab in a right-most cell adds another row to the table.

To select a cell, press Control+A (Windows) or Command+A (Macintosh) while the
insertion point is in the cell.

Exploring the Workspace

3.

To select a table, press Control+A (Windows) or Command+A (Macintosh) twice if the
insertion point is in a cell, or once if a cell is selected.

4.

To exit the table, press Control+A (Windows) or Command+A (Macintosh) three times if
the insertion point is in a cell, twice if the cell is selected, or once if the table is selected, and
then press the Up, Left, or Right Arrow key.

Related topics
■
“Navigating panels” on page 65
■

“Navigating the Property inspector” on page 66

■

“Navigating dialog boxes” on page 67

■

“Navigating frames” on page 68

Optimizing the workspace for accessible
page design
When you create accessible pages, you need to associate information, such as labels and
descriptions, with your page objects to make your content accessible to all users.
To do this, activate the Accessibility dialog box for each object, so that Dreamweaver prompts
you for accessibility information when you insert objects. You can activate a dialog box for any
of the objects in the Accessibility category in Preferences.
To activate the Accessibility dialog boxes:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears.

2.

Select Accessibility from the Category list on the left.

Optimizing the workspace for accessible page design

69

The Preferences dialog box displays accessibility options.

3.

Select the objects you want to activate Accessibility dialog boxes for.
For more information, click the Help button in the dialog box.
NO T E

4.

Accessibility attributes automatically appear in the Insert Table dialog box when you
insert a new table.

Click OK.

For each object you select, an Accessibility dialog box prompts you to enter accessibility tags
and attributes when you insert that object in a document.
Related topics
■
“Dreamweaver and accessibility” on page 30
■

“Inserting an image” on page 409

■

“Validating HTML form data” on page 814

■

“Creating frames and framesets” on page 281

■

“Inserting and editing media objects” on page 472

■

“Inserting a table and adding content” on page 235

70

Exploring the Workspace

Using visual guides in Dreamweaver
Dreamweaver provides several kinds of visual guides to help you design documents and
predict (approximately) how they will appear in browsers. You can do any of the following:
■

Instantly snap the Document window to a desired window size to see how the elements fit
on the page. (See “Resizing the Document window” on page 52.)

■

Use a tracing image as the page background to help you duplicate a design created in an
illustration or image-editing application such as Macromedia Fireworks. (See “Using a
tracing image” on page 230.)

■

Use rulers and guides to provide a visual cue for precise positioning and resizing of page
elements. (See “Using rulers, guides, and the grid to lay out pages” on page 226.)

■

Use the grid for precise positioning and resizing of layers. (See “Using the grid”
on page 229.)
Grid marks on the page help you align layers, and when snapping is enabled, layers
automatically snap to the closest grid point when moved or resized. (Other objects, such
as images and paragraphs, do not snap to the grid.) Snapping works regardless of whether
the grid is visible.

Dreamweaver customizing basics
There are some basic techniques you can use to customize Dreamweaver to suit your needs
without knowing complex code or editing text files. For example, you can change the
workspace layout, hide or display the Start page, set preferences, create your own keyboard
shortcuts, and add extensions to Dreamweaver.
For information about customizing panel layout in the workspace, see “Using panels and
panel groups” on page 61.
N OT E

For information about customizing configuration files by hand, see “Customizing
Dreamweaver” on the Macromedia Support Center at www.macromedia.com/go/
customizing_dreamweaver.

This section describes only the most common of the preference options. For information on a
specific preference option not covered here, search for the corresponding topic in Using
Dreamweaver.
Related topics
■
“About customizing Dreamweaver in multiuser systems”
■

Extending Dreamweaver

Dreamweaver customizing basics

71

Choosing the workspace layout (Windows only)
In Windows, you can choose between the Designer and Coder workspace layouts. The first
time you start Dreamweaver, a dialog box lets you choose a workspace layout. You can switch
to a different workspace at any time.
To choose a workspace layout the first time you start Dreamweaver:
1.

Select one of the following layouts:
Designer is an integrated workspace using MDI (Multiple Document Interface), in which

all Document windows and panels are integrated into one larger application window, with
the panel groups docked on the right.
Coder is the same integrated workspace, but with the panel groups docked on the left, in
a layout similar to that used by Macromedia HomeSite and Macromedia ColdFusion
Studio, and with the Document window showing Code view by default.
NO TE

2.

You can dock panel groups on either side of the workspace in either layout.

Click OK.

To switch to a different workspace after you’ve chosen one:
■

Select Window > Workspace Layout, and select the workspace layout you prefer.

In addition to selecting Coder and Designer, you can select Dual Screen Right or Dual Screen
Left. If you have a secondary monitor to the right of your primary monitor, Dual Screen
Right puts all panels on the right monitor, and keeps the Document window on the primary
monitor. If you have a secondary monitor to the left of your primary monitor, Dual Screen
Left puts all panels on the left monitor, and keeps the Document window on the primary
monitor.
Related topics
■
“The workspace layout” on page 40
■

“Saving custom workspace layouts” on page 73

■

“Cascading or tiling Document windows” on page 52

Displaying tabbed documents (Macintosh)
On the Macintosh, Dreamweaver can display multiple documents in a single Document
window by using tabs to identify each document. Dreamweaver can also display them as part
of a floating workspace, in which each document appears in its own window.

72

Exploring the Workspace

To open a tabbed document in a separate window:
■

Right-click or Control-click the tab and select Move to New Window from the context
menu.

To combine separate documents into tabbed windows:
■

Select Window > Combine as Tabs.

To change the default tabbed document setting:
1.

Select Dreamweaver > Preferences, and then select the General category.

2.

Select or deselect Open Documents in Tabs, and click OK.
NO T E

Dreamweaver does not alter the display of documents that are currently open when
you change preferences. Documents opened after you select a new preference,
however, will display according to the preference you selected.

Related topics
■
“The workspace layout” on page 40
■

“Cascading or tiling Document windows” on page 52

Saving custom workspace layouts
Dreamweaver lets you save and restore different panel sets so that you can customize your
workspace for different activities. When you save a workspace layout, Dreamweaver
remembers the panels in the specified layout, as well as other attributes such as the positions
and sizes of the panels, their collapsed or expanded states, and the position and size of the
application window.
To save a custom workspace layout:
1.

Arrange the panels as desired.

2.

Select Window > Workspace Layout > Save Current.

3.

Enter a name for the layout and click OK.

To switch to another custom workspace layout:
■

Select Window > Workspace Layout, and select your custom layout.

Dreamweaver customizing basics

73

To rename or delete a custom workspace layout:
1.

Select Window > Workspace Layout > Manage.

2.

Select a layout and do one of the following:

3.

■

To rename a layout, click the Rename button, enter a new layout name, and click OK.

■

To delete a layout, click the Delete button.

Click OK.

Related topics
■
“Using panels and panel groups” on page 61
■

“Choosing the workspace layout (Windows only)” on page 72

■

“Displaying tabbed documents (Macintosh)” on page 72

Hiding and displaying the Start page
The Dreamweaver Start page appears when you start Dreamweaver and anytime that you do
not have any documents open. You can choose to hide the Start page, then later display it
again. When the Start page is hidden and there are no documents open, the Document
window is blank.
NO TE

You can choose to have Dreamweaver open the last document you were working each
time you start. For more information, see “Setting General preferences for
Dreamweaver” on page 75.

To hide the Start page:
■

Select the Don’t Show Again checkbox on the Start page.

The Start page will not appear when you start Dreamweaver, or after you open and close
a document.
To display the Start page:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears displaying the General preferences category.

2.

Select the Show Start Page checkbox.

The Start page appears when you start Dreamweaver, or after you open and close a document.

74

Exploring the Workspace

Setting General preferences for Dreamweaver
The General preferences control the general appearance of Dreamweaver.
To change the General preferences:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears displaying the General preferences category.

2.

Set preference options.
For more information, click Help.

3.

Click OK.

Setting Fonts preferences for Dreamweaver display
A document’s encoding determines how the document appears in a browser. Dreamweaver
font preferences let you view a given encoding in the font and size you prefer without
affecting how the document appears when viewed by others in a browser.
To set the fonts to use in Dreamweaver for each type of encoding:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears.

2.

Select Fonts from the Category list on the left.

3.

Select an encoding type (such as Western (Latin1) or Japanese) from the Font Settings list,
then select fonts to use within Dreamweaver for that encoding, using the font pop-up
menus below the Font Settings list.
For more information, click Help.
N OT E

4.

The fonts you select do not affect how the document appears in a visitor’s browser.

Click OK.

Related topics
■
“Understanding document encoding” on page 344

Dreamweaver customizing basics

75

Customizing keyboard shortcuts
Use the Keyboard Shortcut Editor to create your own shortcut keys, including keyboard
shortcuts for code snippets. You can also remove shortcuts, edit existing shortcuts, and select a
predetermined set of shortcuts in the Keyboard Shortcut Editor.
NO TE

A chart showing all the keyboard shortcuts in the default Dreamweaver configuration are
available as a quick reference guide on the Macromedia website at
www.macromedia.com/go/dw_documentation.

To customize keyboard shortcuts:
1.

Select Edit > Keyboard Shortcuts (Windows) or Dreamweaver > Keyboard Shortcuts
(Macintosh).
The Keyboard Shortcuts dialog box appears.
Duplicate Set button
Delete Set button
Export Set as HTML button
Rename Set button

2.

Add, delete, or edit keyboard shortcuts.
For more information, click Help.

3.

76

Click OK.

Exploring the Workspace

Adding extensions to Dreamweaver
Extensions are new features that you can add easily to Dreamweaver. You can use many types
of extensions; for example, there are extensions that let you reformat tables, connect to backend databases, or help you write scripts for browsers.
NO TE

To install extensions that all users have access to in a multiuser operating system, you
must be logged in as Administrator (Windows) or root (Mac OS X). For more information
about multiuser systems, see “About customizing Dreamweaver in multiuser systems”
on page 50.

To find the latest extensions for Dreamweaver, use the Macromedia Exchange website at
www.macromedia.com/go/dreamweaver_exchange/. Once there, you can log in and
download extensions (many of which are free), join discussion groups, view user ratings and
reviews, and install and use the Extension Manager. You must install the Extension Manager
before you can install extensions.
The Extension Manager is a separate application that lets you install and manage extensions in
Macromedia applications. Start the Extension Manager from Dreamweaver by choosing
Commands > Manage Extensions.
To install and manage extensions:
1.

On the Macromedia Exchange website, click the download link for an extension.
Your browser may let you choose to open and install it directly from the site or save it to
disk.
■

■

2.

If you are opening the extension directly from the site, the Extension Manager handles
the installation automatically.
If you are saving the extension to disk, a good place to save the extension package file
(.mxp) is the Downloaded Extensions folder within the Dreamweaver application
folder on your computer.

Double-click the extension package file, or open the Extension Manager and select File >
Install Extension.
The extension is installed in Dreamweaver. Some extensions aren’t accessible until
Dreamweaver has restarted; you may be prompted to quit and restart the application.
NO T E

Use the Extension Manager to remove extensions or to see more information about
an extension.

Dreamweaver customizing basics

77

78

Exploring the Workspace

CHAPTER 2

2

Setting Up a Dreamweaver
Site
A website is a set of linked documents and assets with shared attributes, such as related topics,
a similar design, or a shared purpose. Macromedia Dreamweaver 8 is a site creation
and management tool, so you can use it to create complete websites, in addition to
individual documents.
The first step in creating a website is planning. For best results, design and plan the structure
of your website before you create any of the pages that the site will contain.
The next step is to set up Dreamweaver so that you can work on the basic structure of the site.
If you already have a site on a web server, you can use Dreamweaver to edit that site.
TIP

As you develop site content, consider basing your pages on Dreamweaver templates.
See “About Dreamweaver templates” on page 296 and “Creating a Dreamweaver
template” on page 308.

This chapter includes the following sections:
About Dreamweaver sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Setting up a new Dreamweaver site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Using the Advanced settings to set up a Dreamweaver site. . . . . . . . . . . . . . . . . . . . 83
Editing settings for a Dreamweaver site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Editing existing websites in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

About Dreamweaver sites
A Dreamweaver site provides a way to organize all of the documents associated with a website.
Organizing your files in a site enables you to use Dreamweaver to upload your site to the web
server, automatically track and maintain your links, manage files, and share files. To take full
advantage of Dreamweaver features, you should define a site.
A Dreamweaver site consists of as many as three parts, or folders, depending on your
development environment and the type of website you are developing:

79

The local folder

is your working directory. Dreamweaver refers to this folder as your “local
site.” This folder can be on your local machine or it can be on a network server. It is where you
store the files you are working on for a Dreamweaver site.
All you need to do to define a Dreamweaver site is set up a local folder. To transfer files to a
web server or to develop web applications, you need to also add information for a remote site
and testing server.

The remote folder is where you store your files, depending on your development
environment, for testing, production, collaboration, and so on. Dreamweaver refers to this
folder as your “remote site” in the Files panel. Typically, your remote folder is on the machine
where your web server is running.

Together, the local and remote folders enable you to transfer files between your local disk and
web server; this makes it easy for you to manage files in your Dreamweaver sites.
The testing server folder is

the folder where Dreamweaver processes dynamic pages. For
more information, see “Specifying where dynamic pages can be processed” on page 608.
Related topics
“Setting up a new Dreamweaver site” on page 82

■

Understanding local and remote folder structure
When you set up access to the remote folder for your Dreamweaver site (see “Setting up a
remote folder” on page 85), you must determine the remote folder’s host directory. The host
directory you specify should correspond to the root folder of the local folder. The following
diagram shows a sample local folder on the left and a sample remote folder on the right.
no

local site
(root folder)
Assets

yes

no

HTML

login directory
(Shouldn't be Host
Directory in this case)
public_html
(Should be
Host Directory)
Assets
(Shouldn't be
Host Directory)
HTML

If the structure of your remote folder doesn’t match the structure of your local folder,
Dreamweaver uploads your files to the wrong place and the files might not be visible to site
visitors. Also, your image and link paths might be broken.

80

Chapter 2: Setting Up a Dreamweaver Site

The remote root directory must exist before Dreamweaver can connect to it. If you don’t have
a root directory for your remote folder, create one or ask the server’s administrator to create
one for you.
Even if you intend to edit only part of the remote site, you must locally duplicate the entire
structure of the relevant branch of the remote site, from the remote site’s root folder down to
the files you want to edit.
For example, if your remote site’s root folder, named public_html, contains two folders,
Project1 and Project2, and you want to work only on the HTML files in Project1, you don’t
need to download the files in Project2, but you must map your local root folder to
public_html, not to Project1.
LOCAL SITE

REMOTE SITE
public_html

local root folder
(map this to public_html, not to
Project1 or Project1/HTML)

Project 1

Assets

HTML

Project 1
(must be present on local site;
corresponds to Project1 on remote site)
HTML
(must be present on local site;
corresponds to Project1/HTML
on remote site)

Project 2

Assets

HTML

Related topics
■
“About Dreamweaver sites” on page 79
■

“Setting up a remote folder” on page 85

About Dreamweaver sites

81

Setting up a new Dreamweaver site
After you plan your site structure, or if you already have an existing site, you should define a
site in Dreamweaver before you start developing. Setting up a Dreamweaver site is a way to
organize all of the documents associated with a website. For more information, see “About
Dreamweaver sites” on page 79.
NO T E

You can also edit files without setting up a Dreamweaver site. For more information, see
“Accessing sites, a server, and local drives” on page 106.

After you set up a Dreamweaver site, it’s a good idea to export the site so that you have a local
backup copy. For more information, see “Importing and exporting sites” on page 132.
To set up a Dreamweaver site:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.
N OT E

2.

If you don’t have any Dreamweaver sites defined, then the Site Definition dialog box
appears and you can skip the next step.

Click the New button.
The Site Definition dialog box appears.

3.

Do one of the following:
■

Click the Basic tab to use the Site Definition Wizard, which steps you through the
setup process.
N OT E

■

Click the Advanced tab to use the Advanced settings, which enable you to set up local,
remote, and testing folders individually, as necessary.
N OT E

4.

To get started, you can set up a Dreamweaver site completely or you can just
start with the first step, setting up your local folder.

Complete the Dreamweaver site setup process:
■

82

Users who are new to Dreamweaver are encouraged to use the Site Definition
Wizard; experienced Dreamweaver users might prefer to use the Advanced
settings.

For the Site Definition Wizard, answer the questions on each screen, then click Next
to advance through the setup process or click Back to return to a previous screen.

Chapter 2: Setting Up a Dreamweaver Site

■

For Advanced settings, complete the Local Info category, the RemoteInfo category,
and the Testing Server category, as necessary (see “Using the Advanced settings to set
up a Dreamweaver site” on page 83).
T IP

After you set up a Dreamweaver site, it’s a good idea to export the site so that
you have a local backup copy. For more information, see “Importing and
exporting sites” on page 132.

If you are setting up a Dreamweaver site for a web application, see Chapter 23, “Setting Up a
Web Application,” on page 599.

Using the Advanced settings to set up a
Dreamweaver site
You can use the Advanced settings of the Site Definition dialog box to set up a Dreamweaver
site. The Advanced settings enable you to set up local, remote, and testing (for processing
dynamic pages) folders individually, as necessary. This method is recommended for users who
have experience with using Dreamweaver.
NO TE

To get started quickly, you can just start with the first step of setting up a Dreamweaver
site, setting up your local folder. Then, you can add remote and testing information later.
You should at least set up a local folder before you start using Dreamweaver.

If you are new to Dreamweaver, you can use the Site Definition Wizard, instead of the
Advanced settings, to guide you through the setup process. (See “Setting up a new
Dreamweaver site” on page 82.)
If you are setting up a Dreamweaver site for a web application, skip this section and see
Chapter 23, “Setting Up a Web Application,” on page 599.
TIP

After you set up a Dreamweaver site, it’s a good idea to export the site so that you have a
local backup copy. For more information, see “Importing and exporting sites”
on page 132.

Related topics
■
“About Dreamweaver sites” on page 79
■

“Specifying where dynamic pages can be processed” on page 608

Using the Advanced settings to set up a Dreamweaver site

83

Setting up a local folder
The local folder is your working directory for your Dreamweaver site. This folder can be on
your local machine or it can be on a network server.
To set up a local folder:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.
N OT E

2.

If you don’t have any Dreamweaver sites defined, then the Site Definition dialog box
appears and you can skip the next step.

Click New.
The Site Definition dialog box appears.

3.

Click the Advanced button, if the Advanced settings aren’t showing.
The Advanced tab of the Site Definition dialog box displays the Local Info category
options.

84

Chapter 2: Setting Up a Dreamweaver Site

4.

Enter the Local Info options.
For more information, click the Help button in the dialog box.

5.

(Optional) If you are ready to set up your remote server now, skip the remaining step; select
the Remote Info category on the left, then complete the dialog box.
For more information, click the Help button in the dialog box.

6.

Click OK.
Dreamweaver creates the initial site cache, and the new Dreamweaver site appears in the
Files panel.

After you set up a local folder, you might also add remote and testing folders (see “Setting up
a remote folder” on page 85 and “Specifying where dynamic pages can be processed”
on page 608).
Related topics
“About Dreamweaver sites” on page 79

■
■

“Managing Your Files” on page 101

Setting up a remote folder
After you set up a local folder for a Dreamweaver site (see “Setting up a local folder”
on page 84), you can set up a remote folder. Depending on your development environment,
the remote folder is where you store files for testing, collaboration, production, deployment,
or so on.
N OT E

You don’t need to specify a remote folder if the folder you specified as your local folder is
the same folder you created for your site files on the system running your web server.
This implies the web server is running on your local computer.

Determine how you will access the remote folder and note the connection information. This
section describes how to set up a remote folder and connect to it.
To set up a remote folder:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Select an existing Dreamweaver site.
If you have not defined any Dreamweaver sites, create a local folder before proceeding
(see “Setting up a local folder” on page 84).

3.

Click Edit.
The Site Definition dialog box appears.

Using the Advanced settings to set up a Dreamweaver site

85

4.

Click the Advanced button, if the Advanced settings aren’t showing.

5.

Select Remote Info from the Category list on the left.

6.

Select an Access option.
For more information, click the Help button in the dialog box.

7.

Click OK.
Dreamweaver creates a connection to the remote folder. If you are developing a dynamic
site, you can add a Testing Server folder for processing dynamic pages (see “Specifying
where dynamic pages can be processed” on page 608).

To connect to a remote folder with FTP access:
■

In the Files panel, click the Connects to Remote Host button in the toolbar.

To disconnect from a remote folder with FTP access:
■

In the Files panel, click the Disconnect button in the toolbar.

To connect or disconnect from a remote folder with network access:
■

You don’t need to connect to the remote folder; you’re always connected. Click the Refresh
button to see your remote files.

Related topics
■
“About Dreamweaver sites” on page 79
■

“Understanding local and remote folder structure” on page 80

■

“Troubleshooting the remote folder setup” on page 86

Troubleshooting the remote folder setup
A web server can be configured in a wide variety of ways. The following list provides
information on some common issues you may encounter in setting up a remote folder (see
“Setting up a remote folder” on page 85), and how to resolve them:
■

The Dreamweaver FTP implementation may not work properly with certain proxy
servers, multilevel firewalls, and other forms of indirect server access.
If you encounter problems with FTP access, ask your local system administrator for help.

■

For the Dreamweaver FTP implementation, you must connect to the remote system’s root
folder. (In many applications, you can connect to any remote directory, then navigate
through the remote file system to find the directory you want.)
Be sure that you indicate the remote system’s root folder as the host directory.

86

Chapter 2: Setting Up a Dreamweaver Site

If you have problems connecting, and you’ve specified the host directory using a single
slash (/), you might need to specify a relative path from the directory you are connecting
to and the remote root folder.
For example, if the remote root folder is a higher level directory, you may need to specify a
../../ for the host directory.
■

File and folder names that contain spaces and special characters often cause problems
when transferred to a remote site.
Use underscores in place of spaces, and avoid special characters in file and folder names
wherever possible. In particular, colons, slashes, periods, and apostrophes in file or folder
names can cause problems. Special characters in file or folder names may also sometimes
prevent Dreamweaver from creating a site map.

■

If you encounter problems with long filenames, rename them with shorter names. On
Macintosh, filenames cannot be more than 31 characters long.

■

Note that many servers use symbolic links (UNIX), shortcuts (Windows), or aliases
(Macintosh) to connect a folder on one part of the server’s disk with another folder
elsewhere.
For example, the public_html subdirectory of your home directory on the server may
really be a link to another part of the server entirely. In most cases, such aliases have no
effect on your ability to connect to the appropriate folder or directory; however, if you can
connect to one part of the server but not another, there may be an alias discrepancy.

■

If you encounter an error message such as “cannot put file,” your remote folder may be out
of space. For more detailed information, look at the FTP log.
N OT E

In general, when you encounter a problem with an FTP transfer, examine the FTP log
by selecting Window > Results (Windows) or Site > FTP Log (Macintosh), then
clicking the FTP Log tag.

Editing settings for a Dreamweaver site
Use the Site Definition Advanced settings to edit your Dreamweaver sites.
To edit settings for a Dreamweaver site, do one of the following:
■

Select Site > Manage Sites, select a site in the Manage Sites dialog box, then click Edit.

■

In the Files panel, select Manage Sites from the pop-up menu where the current site,
server, or drive appears; select a site in the Manage Sites dialog box, then click Edit.

Related topics
■
“Setting up a new Dreamweaver site” on page 82

Editing settings for a Dreamweaver site

87

Editing existing websites in Dreamweaver
You can use Dreamweaver to edit existing sites, even if you didn’t use Dreamweaver to create
the original site. You can edit existing sites that are on your local system or sites that are on a
remote system.

Editing an existing local website in Dreamweaver
You can use Dreamweaver to edit an existing website on your local disk, even if you didn’t use
Dreamweaver to create the original site.
NO T E

This section sets up a Dreamweaver site to edit an existing local website. You can also
edit the existing site without creating a Dreamweaver site. For more information, see
“Accessing sites, a server, and local drives” on page 106.

To edit an existing local website:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Click New.
The Site Definition dialog box appears.

3.

Click the Advanced button, if the Advanced settings aren’t showing.
The Advanced tab of the Site Definition dialog box displays the Local Info category
options.

4.

Complete the dialog box.
For more information, click the Help button in the dialog box.

5.

Click OK.

Editing an existing remote website in Dreamweaver
You can use Dreamweaver to copy an existing remote site (or any branch of a remote site) to
your local disk and edit it there, even if you didn’t use Dreamweaver to create the original site.
N O TE
88

This section sets up a Dreamweaver site to edit an existing remote website. You can also
edit the existing site without creating a Dreamweaver site. For more information, see
“Accessing sites, a server, and local drives” on page 106.

Chapter 2: Setting Up a Dreamweaver Site

To edit an existing remote site:
1.

Create a local folder to contain the existing site, then set it up as the local folder for the site
(see “Setting up a local folder” on page 84).
NO TE

2.

You must locally duplicate the entire structure of the relevant branch of the existing
remote site. For more information, see “Understanding local and remote folder
structure” on page 80.

Set up a remote folder (see “Setting up a remote folder” on page 85), using information
about your existing site.
Make sure to choose the correct root folder for the remote site.

3.

In the Files panel (Window > Files), click the Connects to Remote Host button (for FTP
access) or the Refresh button (for network access) in the toolbar to view the remote site.

4.

Depending on how much of the remote site you want to edit, do one of the following:
■

■

If you want to work with the entire site, select the root folder of the remote site in the
Files panel, then click Get in the toolbar to download the entire site to your local disk.
If you want to work with just one of the files or folders of the site, locate the file or
folder in the Remote view of the Files panel, then click Get in the toolbar to download
that file to your local disk.

Dreamweaver automatically duplicates as much of the remote site’s structure as is
necessary to place the downloaded file in the correct part of the site hierarchy. When
editing only one part of a site, you should generally choose to include dependent files.
5.

Use Dreamweaver to work on your site.

Related topics
■
“Editing an existing local website in Dreamweaver” on page 88

Editing existing websites in Dreamweaver

89

90

Chapter 2: Setting Up a Dreamweaver Site

CHAPTER 3

3

Creating and Opening
Documents
Macromedia Dreamweaver 8 offers a flexible environment for working with a variety of web
design and development documents. In addition to HTML documents, you can create and
open a variety of text-based documents, including CFML, ASP, JavaScript, and CSS.
Dreamweaver also supports source code files, such as Visual Basic, .NET, C#, and Java.
Dreamweaver provides several options for creating a new document. You can create any of
the following:
■

A new blank document or template

■

A document based on one of the predesigned page layouts included with Dreamweaver

■

A document based on one of your existing templates

Other document options are also available. For example, if you typically work with one type
of document, you can set it as the default document type for new pages you create.
In Dreamweaver, you can easily define document properties, such as meta tags, document
title, and background colors, and several other page properties in either the Design view or
Code view.
This chapter contains the following sections:
Creating new documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Saving a new document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Setting a default new document type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Setting the default file extension of new HTML documents. . . . . . . . . . . . . . . . . . . . 94
Opening existing documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Cleaning up Microsoft Word HTML files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

89

Creating new documents
Dreamweaver provides you with several choices for selecting a new document to work in. You
can create a new document in the following ways:
■

Start with a blank document (see “Creating a new blank document” on page 90).

■

Create a blank document or template based on a Dreamweaver design file (see “Creating a
document based on a Dreamweaver design file” on page 91).

■

Use a template that defines how a document looks, and sets which parts of a document
can be edited (see “Creating a document based on an existing template” on page 92).
TIP

If you typically work with a specific document type, you can set a default document
and automatically open a new document based on the default document you’ve
defined. For information, see “Setting a default new document type” on page 93.

Creating a new blank document
You can select the type of blank document you want to create.
To create a new blank document:
1.

Select File > New.
The New Document dialog box appears. The General tab is already selected.

2.

From the Category list, select Basic Page, Dynamic Page, Template Page, Other, or
Framesets; then, from the list on the right, select the type of document you want to create.
For example, select Basic Page to create an HTML document, or select Dynamic page to
create a ColdFusion or ASP document, and so on.
For more information about options in this dialog box, click the Help button in the
dialog box.

3.

Click the Create button.
The new document opens in the Document window.

4.

Save the document (see “Saving a new document” on page 93).

Related topics
■
“Creating a document based on an existing template” on page 92

90

Chapter 3: Creating and Opening Documents

Creating a document based on a Dreamweaver
design file
Dreamweaver comes with several professionally developed page layout and design element
files. You can use these design files as starting points for designing pages in your sites. When
you create a document based on a design file, Dreamweaver creates a copy of the file.
NO T E

If you create a document based on a predefined frameset only the frameset structure is
copied, not the frame contents; additionally, you will have to save each frame file
separately. For information about saving frames, see “Saving frame and frameset files”
on page 285.

To create a new document from a Dreamweaver design file:
1.

Select File > New.
The New Document dialog box appears. The General tab is already selected.

2.

In the Category list, select CSS Style Sheets, Table Based Layouts, Page Designs (CSS),
Page Designs, or Page Designs (Accessible); then select a design file from the list on the
right.
You can preview a design file and read a brief description of a document’s design elements.
For more information about options in this dialog box, click the Help button in the
dialog box.

3.

Click the Create button.
The new document opens in the Document window. If you selected a CSS style sheet, the
CSS document appears in the Document window and the CSS Style Sheet opens in Code
view.

4.

Save the document (see “Saving a new document” on page 93).
If the file contains links to asset files, the Copy Dependent Files dialog box appears for you
to save a copy of the dependent files.

5.

If the Copy Dependent Files dialog box appears, set options, then click Copy to copy the
assets to the selected folder.
You can choose your own location for the dependent files or use the default folder location
Dreamweaver generates (based on the design file’s source name).

Related topics
■
“Creating a new blank document” on page 90

Creating new documents

91

Creating a document based on an existing template
You can select, preview, and create a new document from an existing template. You can use
the New Document dialog box to select a template from any of your Dreamweaver-defined
sites or you can use the Assets panel to create a new document from an existing template.
For information about creating templates, see “Creating a Dreamweaver template”
on page 306.
TIP

If you don’t have any templates in your site, you can save a document in one of the
design file categories of the New Document dialog box as a template, then create pages
based on that template. For information about saving a design file as a template, see
“Creating a document based on a Dreamweaver design file” on page 91.

To create a new document based on a template:
1.

Select File > New.
The New Document dialog box opens.

2.

Click the Templates tab.

3.

In the Templates For list, select the Dreamweaver site that contains the template you want
use, then select a template from the list on the right.
For more information about options in this dialog box, click the Help button in the
dialog box.

4.

Click Create.
The new document opens in the Document window.

5.

Save the document (see “Saving a new document” on page 93).

To create a new document from a template in the Assets panel:
1.

Open the Assets panel (Window > Assets), if it is not already open.

2.

In the Assets panel, click the Templates icon on the left to view the list of templates in your
current site.
TIP

3.

If you just created the template you want to apply, you might need to click the
Refresh button to see it.

Right-click (Windows) or Control-click (Macintosh) the template you want to apply, then
select New From Template.
The document opens in the Document window.

92

Chapter 3: Creating and Opening Documents

Related topics
■
“Creating a new blank document” on page 90
■

“Creating a document based on a Dreamweaver design file” on page 91

Saving a new document
When you create a new document, you need to save it.
To save a new document:
1.

Select File > Save.

2.

In the dialog box that appears, navigate to the folder where you want to save the file.
TIP

3.

It’s a good idea to save your file in a Dreamweaver site. For more information, see
“Setting up a new Dreamweaver site” on page 80.

In the File Name text box, type a name for the file.
Avoid using spaces and special characters in file and folder names and do not begin a
filename with a numeral. In particular, do not use special characters (such as é, ç, or ¥) or
punctuation (such as colons, slashes, or periods) in the names of files you intend to put on
a remote server; many servers change these characters during upload, which will cause any
links to the files to break.

4.

Click Save.

Setting a default new document type
You can define which document type Dreamweaver uses as a default document for a site.
For example, if most pages in your site will be a specific file type (such as Cold Fusion,
HTML, or ASP documents), you can set document preferences that automatically create new
documents of the specified file type.
To set a default new document type and preferences:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears.
TIP

2.

You can also click the Preferences button in the New Document dialog box to set
new document preferences when you create a new document (see “Creating a new
blank document” on page 90).

Click New Document from the category list on the left.

Setting a default new document type

93

3.

Set or change preferences as necessary.
For more information on options in the dialog box, click the Help button.

4.

Click OK.
Dreamweaver saves your preferences.

Setting the default file extension of new
HTML documents
You can define the default file extension of HTML documents created in Dreamweaver. For
example, you can tell Dreamweaver to use an .htm or .html extension for all new HTML
documents.
To set the default file extension of new HTML documents:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears.
TIP

You can also click the Preferences button in the New Document dialog box to set
new document preferences when you create a new document (see “Creating a new
blank document” on page 90).

2.

Click New Document from the category list on the left.

3.

In the Default Document Type, make sure HTML is selected.

4.

In the Default Extension text box, specify the file extension you want for new HTML
documents created in Dreamweaver.
For Windows, you can specify the following extensions: .html, .htm, .shtml, .shtm, .stm,
.tpl, .lasso, .xhtml.
For Macintosh, you can specify the following extensions: .html, .htm, .shtml, .shtm, .tpl,
.lasso, .xhtml, .ssi.

Opening existing documents
In Dreamweaver, you can open an existing web page or text-based document, even if it wasn’t
created in Dreamweaver. You can open the document and use Dreamweaver to edit it in either
Design view or Code view.

94

Chapter 3: Creating and Opening Documents

If the document you open is a Microsoft Word file that was saved as an HTML document,
you can use the Cleanup Word HTML command to remove the extraneous markup tags that
Word inserts into HTML files. For more information, see “Cleaning up Microsoft Word
HTML files” on page 95.
To clean up HTML or XHTML that was not generated by Microsoft Word, see “Cleaning up
your code” on page 573.
You can also open non-HTML text files, such as JavaScript files, XML files, CSS style sheets,
or text files saved by word processors or text editors.
To open an existing file:
1.

Select File > Open.
The Open dialog box appears.
TIP

2.

Navigate to and select the file you want to open.
N OT E

3.

You can also use the Files panel to open files. For more information, see “Working
with files in the Files panel” on page 119.

If you haven’t already done so, it’s a good idea to organize files you plan to open and
edit in a Dreamweaver site, instead of opening them from another location. For
information about setting up a Dreamweaver site, see “Setting up a new
Dreamweaver site” on page 80.

Click Open.
The document opens in the Document window.
JavaScript, text, and CSS Style Sheets open in Code view by default. You can update the
document while working in Dreamweaver, then save the changes in the file. For
information about setting an external text editor for viewing these types of files, see
“Starting an external editor for media files” on page 472.

Cleaning up Microsoft Word HTML files
In Dreamweaver, you can open documents saved by Microsoft Word as HTML files, and then
use the Clean Up Word HTML command to remove the extraneous HTML code generated
by Word. The Clean Up Word HTML command is available for documents saved as HTML
files by Word 97 or later.

Cleaning up Microsoft Word HTML files

95

The code that Dreamweaver removes is primarily used by Word to format and display
documents in Word and is not needed to display the HTML file. Retain a copy of your
original Word (.doc) file as a backup, because you may not be able to reopen the HTML
document in Word once you’ve applied the Clean Up Word HTML feature.
To clean up HTML or XHTML that was not generated by Microsoft Word, see “Cleaning up
your code” on page 573.
To open and clean up a Microsoft Word HTML file:
1.

If you haven’t already done so in Microsoft Word, save your document as an HTML file.
NO T E

2.

In Windows, close the file in Word to avoid a sharing violation.

Open the HTML file in Dreamweaver.
To view the HTML code generated by Word, switch to Code view (View > Code).

3.

Select Commands > Clean Up Word HTML.
The Clean Up Word HTML dialog box appears.
There may be a slight delay while Dreamweaver attempts to determine which version of
Word was used to save the file. If Dreamweaver is unable to determine this, select the
correct version using the pop-up menu.

4.

Deselect options in the dialog box if you want.
For more information about options in the dialog box, click the Help button.

5.

Click OK.
Dreamweaver applies the cleanup settings to the HTML document and a log of the
changes appears (unless you deselected that option in the dialog box).

Related topics
■
“Importing Microsoft Office documents (Windows only)” on page 381

96

Chapter 3: Creating and Opening Documents

PART 2

Working with Dreamweaver
Sites

2

Learn how to manage Macromedia Dreamweaver 8 sites and site-specific
assets.
This part contains the following chapters:
Chapter 4: Managing Your Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Chapter 5: Managing Site Assets and Libraries . . . . . . . . . . . . . . 159
Chapter 6: Managing Contribute Sites with Dreamweaver. . . . . 181

99

4

CHAPTER 4

Managing Your Files
Macromedia Dreamweaver 8 helps you organize and manage your files.
Dreamweaver includes a number of features for managing files and transferring files to and
from a remote server. When you transfer files between local and remote sites, Dreamweaver
maintains parallel file and folder structures between the sites. When transferring files between
sites, Dreamweaver automatically creates necessary folders when they do not yet exist in a site.
You can also synchronize the files between your local and remote sites; Dreamweaver copies
files in both directions as necessary and removes unwanted files when appropriate.
Dreamweaver contains features to make collaborative work on a website easier. You can check
files in and out of a remote server so that other members of a web team can see who is
working on a file. You can add Design Notes to your files to share information with team
members about a file’s status, priority, and so on. You can also use the Workflow Reports
feature to run reports on your site to display information on the check-in/check-out status,
and to search for Design Notes attached to files.
This chapter contains the following sections:
About site management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Accessing sites, a server, and local drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Viewing files and folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Comparing files for differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Rolling back files (Contribute users). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Managing files and folders in the Files panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Working with a visual map of your site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Importing and exporting sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Removing a Dreamweaver site from your list of sites. . . . . . . . . . . . . . . . . . . . . . . . . .131
Checking in and checking out files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Getting and putting files to and from your server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Synchronizing the files on your local and remote sites . . . . . . . . . . . . . . . . . . . . . . . 142
Identifying and deleting unused files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

99

Cloaking folders and files in your site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Storing file information in Design Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Testing your site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

About site management
Dreamweaver includes a number of features for managing a site and transferring files to and
from a remote server. Dreamweaver also contains features to make collaborative work on a
website easier, such as Check In/Check Out and Design Notes.

About the Check In/Check Out system
If you’re working in a collaborative environment, you can check files in and out from local
and remote servers.
N OT E

You can use Get and Put functionality with a testing server, but you cannot use the
Check In/ Check Out system with a testing server. For more information about using Get
and Put, see “Getting and putting files to and from your server” on page 138.

Checking out a file is the equivalent of declaring “I’m working on this file now—don’t touch
it!” When a file is checked out, Dreamweaver displays the name of the person who checked
out the file in the Files panel, along with a red check mark (if a team member checked out the
file) or green check mark (if you checked out the file) next to the file’s icon.
Checking in a file makes the file available for other team members to check out and edit.
When you check in a file after editing it, your local version becomes read-only and a lock
symbol appears beside the file in the Files panel to prevent you from making changes to the
file.
Dreamweaver does not make checked-out files read-only on the remote server. If you transfer
files with an application other than Dreamweaver, you can overwrite checked-out files.
However, in applications other than Dreamweaver, the LCK file is visible next to the checkedout file in the file hierarchy to help prevent such accidents.
For more information on LCK files and how the Check In/Check Out system works, see
TechNote 15447 on the Macromedia website at www.macromedia.com/go/15447.
Related topics
■
“Setting up the Check In/Check Out system” on page 132
■

100

“Checking files into and out of a remote folder” on page 135

Chapter 4: Managing Your Files

About background file transfers
Dreamweaver lets you perform other, non-server-related, activities while you’re getting or
putting files. Background file transfer works for all of the transfer protocols supported by
Dreamweaver: FTP, SFTP, LAN, WebDAV, Microsoft Visual SourceSafe, and RDS.
Non-server-related activities include common operations like typing, editing external style
sheets, generating site-wide reports, and creating new sites.
Server-related activities that Dreamweaver cannot perform during file transfers include the
following:
■

Put/Get/Check in/Check out files.

■

Undo check-out.

■

Create a database connection.

■

Bind dynamic data.

■

Preview Live Data.

■

Insert a Web Service.

■

Delete remote files or folders.

■

Preview in Browser on a testing server.

■

Save a file to a remote server.

■

Insert an image from a remote server.

■

Open a file from a remote server.

■

Auto put files upon saving.

■

Drag files to the remote site.

■

Cut, copy, or paste files on the remote site.

■

Refresh Remote view.

Related topics
■
“Managing file transfers” on page 142

About site cloaking
Site cloaking enables you to exclude folders and file types from operations such as Get or Put.
You can cloak individual folders, but not individual files. To cloak files, you must select a file
type and Dreamweaver cloaks all files of that type. Dreamweaver remembers your settings for
each site so that you don’t have to make selections each time you work on that site.

About site management

101

For example, if you’re working on a large site and don’t want to upload your multimedia files
each day, you can use site cloaking to cloak your multimedia folder, and the system excludes
files in that folder from site operations you perform.
You can cloak folders and file types on the remote or local site. Cloaking excludes cloaked
folders and files from the following operations:
■

Performing Put, Get, Check In, and Check Out operations

■

Generating reports

■

Finding newer local and newer remote files

■

Performing sitewide operations, such as checking and changing links

■

Synchronizing

■

Working with Asset panel contents

■

Updating templates and libraries
N OT E

Dreamweaver excludes cloaked templates and library items from Get and Put
operations only. Dreamweaver does not exclude these items from batch operations,
because it might cause them to become out of sync with their instances.

Related topics
■
“Cloaking folders and files in your site” on page 144

About Design Notes
Design Notes are notes that you create for a file. The Design Notes are associated with the file
they describe, but stored in a separate file. You can see which files have Design Notes attached
in the expanded Files panel: A Design Notes icon appears in the Notes column.
You can use Design Notes to keep track of extra file information associated with your
documents, such as image source-filenames and comments on file status. For example, if you
copy a document from one site to another, you can add Design Notes for that document, with
the comment that the original document is in the other site folder.
You can also use Design Notes to keep track of sensitive information that you can’t put inside
a document for security reasons, such as notes on how a particular price or configuration was
chosen, or what marketing factors influenced a design decision.

102

Chapter 4: Managing Your Files

If you open a file in Macromedia Fireworks or Flash and export it to another format,
Fireworks and Flash automatically save the name of the original source file in a Design Notes
file. For example, if you open myhouse.png in Fireworks and export it to myhouse.gif,
Fireworks creates a Design Notes file called myhouse.gif.mno. This Design Notes file contains
the name of the original file, as an absolute file: URL. So, the Design Notes for myhouse.gif
might contain the following line:
fw_source="file:///Mydisk/sites/assets/orig/myhouse.png"

A similar Flash Design Note might contain the following line:
fl_source="file:///Mydisk/sites/assets/orig/myhouse.fla"
N OT E

To share Design Notes, users should define the same site-root path (for example, sites/
assets/orig).

When you import the graphic into Dreamweaver, the Design Notes file is automatically
copied into your site along with the graphic. When you select the image in Dreamweaver and
choose to edit it using Fireworks (see “Starting an external editor for media files”
on page 472), Fireworks opens the original file for editing.
Related topics
■
“Enabling and disabling Design Notes for a site” on page 149
■

“Associating Design Notes with files” on page 150

About dependent files
When you transfer a document between a local and remote folder using the Files panel,
Dreamweaver gives you the option of transferring the document’s dependent files. Dependent
files are images, external style sheets, and other files referenced in your document that a
browser loads when it loads the document.
Dreamweaver also treats library items as dependent files. For more information, see “About
library items” on page 157.
Some servers will report errors when putting library items. However, you can cloak these files
to prevent them from being transferred. For instructions, see “Cloaking folders and files in
your site” on page 144.
Related topics
■
“Getting files from a remote server” on page 138
■

“Putting files on a remote server” on page 140

About site management

103

Accessing sites, a server, and local drives
You can access, modify, and save files and folders in your Dreamweaver sites, as well as files
and folders that are not part of a Dreamweaver site. In addition to Dreamweaver sites, you can
access a server, a local drive, or your desktop.
Before you can access a remote server, you must set up Dreamweaver to work with that server
(see “Setting up Dreamweaver to work without defining a site” on page 106).
NO TE

The best way to manage your files is to create a Dreamweaver site (see “Setting up a
new Dreamweaver site” on page 80).

To open an existing Dreamweaver site:
■

In the Files panel (Window > Files), select a site from the pop-up menu (where the current
site, server, or drive appears).

For information about changing your site view (for example, to view the remote folder), see
“Viewing files and folders” on page 108. For information about opening files in your site, see
“Working with files in the Files panel” on page 119.

104

Chapter 4: Managing Your Files

To open a folder on a remote FTP or RDS server:
1.

In the Files panel (Window > Files), select a server name from the pop-up menu (where the
current site, server, or drive appears).

NO T E

2.

Server names appear for servers you’ve configured Dreamweaver to work with. If
you have not configured a server yet, see “Setting up Dreamweaver to work without
defining a site” on page 106.

Navigate to and edit files as you normally do.
For more information, see “Working with files in the Files panel” on page 119.

To access a local drive or your desktop:
1.

In the Files panel (Window > Files), select Desktop, Local Disk, or CD Drive from the
pop-up menu (where the current site, server, or drive appears).

2.

Navigate to a file, then do any of the following:
■

Open files in Dreamweaver or another application

■

Rename files

■

Copy files

■

Delete files

■

Drag files

Accessing sites, a server, and local drives

105

When you drag a file from one Dreamweaver site to another or to a folder that is not
part of a Dreamweaver site, Dreamweaver copies the file to the location where you
drop it. If you drag a file within the same Dreamweaver site, Dreamweaver moves the
file to the location where you drop it. If you drag a file that is not part of a
Dreamweaver site to a folder that is not part of a Dreamweaver site, Dreamweaver
moves the file to the location where you drop it.
NO T E

To move a file that Dreamweaver copies by default, hold down the Shift key
(Windows) or the Command key (Macintosh) while you drag. To copy a file that
Dreamweaver moves by default, hold the Control key (Windows) or the Option
key (Macintosh) while you drag.

Related topics
■
“Managing files and folders in the Files panel” on page 117

Setting up Dreamweaver to work without defining a
site
Dreamweaver enables you to connect to an FTP or RDS server to work on your documents
without creating a Dreamweaver site.
NO TE

If you work on files without creating a Dreamweaver site, you will not be able to perform
sitewide operations, such as link checking. To set up a Dreamweaver site, see “Setting
up a new Dreamweaver site” on page 80.

To set up Dreamweaver to work with a server from the Document window:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Click New, then select FTP & RDS Servers.
The Configure Server dialog box appears.

3.

Complete the dialog box.
For more information, click the Help button in the dialog box.
N O TE

4.

You only need to complete this dialog box once for each server you want to connect
to.

Click OK.
The Files panel displays the contents of the remote server folder you connected to, and the
server name appears in the pop-up menu at the top of the panel.

106

Chapter 4: Managing Your Files

To set up Dreamweaver to work with a server using the Files panel:
1.

In the Files panel (Window > Files), select Desktop from the pop-up menu (where the
current site, server, or drive appears).

2.

Right-click (Windows) or Control-click (Macintosh) the FTP and RDS Servers node in the
Files panel, then select Add FTP Server or Add RDS Server.

The Configure Server dialog box appears.
3.

Complete the dialog box.
For more information, click the Help button in the dialog box.
N OT E

4.

You only need to complete this dialog box once for each server you want to connect
to.

Click OK.
The Files panel displays the contents of the remote server folder you connected to, and the
server name appears in the pop-up menu at the top of the panel.
N OT E

For large folders, it might take a few moments for the Files panel to display the folder.

Related topics
■
“Accessing sites, a server, and local drives” on page 104

Accessing sites, a server, and local drives

107

Viewing files and folders
You can view files and folders in the Files panel, whether they are associated with a
Dreamweaver site or not. When you view sites, files, or folders in the Files panel, you can
change the size of the viewing area, and, for Dreamweaver sites, you can expand or collapse
the Files panel.
For Dreamweaver sites, you can also customize the Files panel by changing the view—either
your local or remote site—that appears by default in the collapsed panel. Or, you can switch
the content views in the expanded Files panel using the Always Show option (see “Setting
preferences for the Files panel” on page 118).
To open or close the Files panel:
■

Select Window > Files.

To change the size of the view area in the expanded Files panel:
■

In the Files panel (Window > Files), with the panel expanded, do one of the following:
Drag the bar that separates the two views to increase or decrease the view area of the
right or left pane.

■

Use the scroll bars at the bottom of the Files panel to scroll through the views’
contents.

■

In the site map, drag the arrow above a file to change the space between files.

■

To expand or collapse the Files panel (Dreamweaver sites only):
■

In the Files panel (Window > Files), click the Expand/Collapse button in the toolbar.
N OT E

If you click the Expand/Collapse button to expand the panel while it is docked, the
panel maximizes so that you cannot work in the Document window. To return to the
Document window, click the Expand/Collapse button again to collapse the panel. If
you click the Expand/Collapse button to expand the panel while it is not docked, you
can still work in the Document window. Before you can dock the panel again, you
must first collapse it.

When the Files panel is collapsed it displays the contents of the local site, the remote site, or
the testing server as a list of files. When expanded, it displays the local site and either the
remote site or testing server. The Files panel can also display a visual site map of the local site.

108

Chapter 4: Managing Your Files

To change the site view in Files panel, do one of the following (Dreamweaver
sites only):
■

In the collapsed Files panel (Window > Files), select Local View, Remote View, Testing
Server, or Map View from the Site View pop-up menu.
N OT E

■

Local View appears in the pop-up menu by default.

In the expanded Files panel (Window > Files), click the Site Files button (for the remote
site), Testing Server button, or Site Map button in the toolbar.
Testing Server

Site Map
Site Files

If you click the Site Map button, you can choose to view the site map with site files or to
view the site map only. For more information, see “Viewing a site map” on page 122.
NO T E

Before you can view a remote site or a testing server, you must set up a remote site
or testing server (see “Setting up a remote folder” on page 83 or “Specifying where
dynamic pages can be processed” on page 606). Before you can view a site map,
you must set up a home page (see “Viewing a site map” on page 122).

Related topics
■
“Accessing sites, a server, and local drives” on page 104
■

“Managing files and folders in the Files panel” on page 117

Customizing the file and folder details displayed in the
expanded Files panel
When you view a Dreamweaver site in the expanded Files panel (see “Viewing files and
folders” on page 108), Dreamweaver displays information about the files and folders in
columns. For example, you can see the file type or the date a file was modified.

Viewing files and folders

109

You can customize the columns by doing any of the following (some operations are only
available for columns you add, not default columns):
■

Reorder or realign columns

■

Add new columns (for a maximum of 10 columns)

■

Hide columns (except the filename column)

■

Designate columns to be shared with all users connected to a site

■

Delete columns (custom columns only)

■

Rename columns (custom columns only)

■

Associate with a Design Note (custom columns only)

To sort by any detail column in the Files panel:
■

Click the heading for the column you want to sort.
TIP

Click the heading again to reverse the order (ascending or descending) by which
Dreamweaver sorts the column.

To add, delete, or change detail columns:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Select a site, then click Edit.
The Site Definition dialog box appears.

3.

110

Select File View Columns from the category list on the left.

Chapter 4: Managing Your Files

The Site Definition dialog box displays the File View Columns options.

4.

Complete the dialog box.
For more information, click the Help button in the dialog box.

5.

Click OK.

Comparing files for differences
Dreamweaver can work with file comparison tools (also known as “diff tools”) to compare the
code of local and remote versions of the same file, two different remote files, or two different
local files. Comparing local and remote versions is useful if you’re working on a file locally and
you suspect the copy of the file on the server has been modified by someone else. Without
leaving Dreamweaver, you can view and merge the remote changes into your local version
before putting the file to the server.

Comparing files for differences

111

Comparing two local files or two remote files is also useful if you keep previous, renamed
versions of your files. If you’ve forgotten the changes made to a file from a previous version, a
quick comparison will remind you.
Before you start, you must install a third-party file comparison tool on your system. For more
information on file comparison tools, see the Macromedia website at www.macromedia.com/
go/dw8_compare_util. You must also specify the tool in Dreamweaver after you have installed
it, as outlined later in this section.
This section covers the following topics:
■

“Comparing before putting files” on page 114

■

“Comparing when synchronizing files” on page 115

■

“Specifying a comparison tool in Dreamweaver” on page 116

Comparing two files
After installing a file comparison tool on your system and specifying it in Dreamweaver, you
can perform any of the following tasks from Dreamweaver:
■

“Comparing two local files” on page 112

■

“Comparing two remote files” on page 113

■

“Comparing a local file to a remote file” on page 113

■

“Comparing a remote file to a local file” on page 114

■

“Comparing an open file to a remote file” on page 114

Related topics
■
“Comparing before putting files” on page 114
■

“Comparing when synchronizing files” on page 115

Comparing two local files
You can compare two files located anywhere on your computer.
To compare two local files:
1.

In the Files panel, Control-click (Windows) or Command-click (Macintosh) the two files
to select them.
TIP

112

To select files outside your defined site, select your local disk from the left pop-up
menu in the Files panel and then select the files.

Chapter 4: Managing Your Files

2.

Right-click one of the selected files and select Compare Local Files from the context menu.
N OT E

If you have a one-button mouse, Control-click one of the selected files instead.

The file comparison tool starts and compares the two files.

Comparing two remote files
You can compare two files located on your remote server. You must define a Dreamweaver site
with remote settings before you can accomplish this task. For more information, see “Setting
up a new Dreamweaver site” on page 80.
To compare two remote files:
1.

In the Files panel, display the files on the remote server by selecting Remote View from the
right pop-up menu.

2.

Control-click (Windows) or Command-click (Macintosh) the two files to select them

3.

Right-click one of the selected files and select Compare Remote Files from the context
menu.
N OT E

If you have a one-button mouse, Control-click one of the selected files instead.

The file comparison tool starts and compares the two files.

Comparing a local file to a remote file
You can compare a local file to a file located on your remote server. To do this, you must first
define a Dreamweaver site with remote settings. For more information, see “Setting up a new
Dreamweaver site” on page 80.
To compare a local file to a remote file:
■

In the Files panel, right-click a local file and select Compare with Remote from the
context menu.
N OT E

If you have a one-button mouse, Control-click the local file instead.

The file comparison tool starts and compares the two files.

Comparing files for differences

113

Comparing a remote file to a local file
You can compare a remote file to a local file. You must define a Dreamweaver site with remote
settings before accomplishing this task. For more information, see “Setting up a new
Dreamweaver site” on page 80.
To compare a remote file to a local file:
1.

In the Files panel, display the files on the remote server by selecting Remote View from the
right pop-up menu.

■

Right-click a file in the panel and select Compare with Local from the context menu.
NO TE

If you have a one-button mouse, Control-click the file instead.

Comparing an open file to a remote file
You can compare a file open in Dreamweaver to its counterpart on the remote server.
To compare a file open in Dreamweaver to its remote copy:
■

In the Document window, select File > Compare with Remote.
The file comparison tool starts and compares the two files.
TI P

You can also right-click the document tab along the top of the Document window
and select Compare with Remote from the context menu.

Comparing before putting files
If you edit a file locally and then try to upload it to your remote server, Dreamweaver will
notify you if the remote version of the file has changed. Dreamweaver gives you the option of
comparing the two files before you upload the file and overwrite the remote version.
Before you start, you must install a file comparison tool on your system and specify it in
Dreamweaver. For more information, see “Specifying a comparison tool in Dreamweaver”
on page 116.
To compare files when putting a file:
1.

After editing a file in a Dreamweaver site, put the file (Site > Put) to your remote site.
If the remote version of the file has been modified, Dreamweaver notifies you and gives
you the option of seeing the differences.

114

Chapter 4: Managing Your Files

2.

To view the differences, click the Compare button.
The file comparison tool starts and compares the two files.
If you haven’t specified a file comparison tool, Dreamweaver prompts you to specify one.

3.

After you’ve reviewed or merged the changes in the tool, you can proceed with the Put
operation or cancel it.

Related topics
■
“Comparing two files” on page 112

Comparing when synchronizing files
You can compare the local versions of your files with the remote versions when you
synchronize your site files with Dreamweaver.
Before you start, you must install a file comparison tool on your system and specify it in
Dreamweaver. For more information, see “Specifying a comparison tool in Dreamweaver”
on page 116.
To compare files during a synchronization:
1.

Right-click anywhere in the Files panel and select Synchronize from the context menu.
The Synchronize Files dialog box appears.

2.

Complete the Synchronize Files dialog box and click Preview.
For more information, see “Synchronizing the files on your local and remote sites”
on page 142.
After you click Preview, Dreamweaver lists the selected files and the actions it will take
during synchronization.

3.

In the list, select each file you want to compare and click the Compare button (the icon
with two small pages).
N O TE

The file must be text-based, such as HTML or ColdFusion files.

Dreamweaver launches the comparison tool, which compares the local and remote
versions of each file you selected.
Related topics
■
“Comparing two files” on page 112
■

“Comparing before putting files” on page 114

Comparing files for differences

115

Specifying a comparison tool in Dreamweaver
You must install a third-party file comparison tool on your system to compare files from
Dreamweaver. For more information on file comparison tools, see the Macromedia website at
www.macromedia.com/go/dw8_compare_util.
After you have installed a file comparison tool, you must specify it in Dreamweaver, as
outlined in this section.
To specify a file comparison tool:
1.

Install the file comparison tool on the same system as Dreamweaver.

2.

In Dreamweaver, open the Preferences dialog box by selecting Edit > Preferences
(Windows) or Dreamweaver > Preferences (Macintosh), and then select the File Compare
category.

3.

In Windows, click the Browse button and select the application that compares files.

4.

On the Macintosh, click the Browse button and select the tool or script that launches the
file comparison tool from the command line, not the actual comparison tool itself.
Launch tools or scripts are typically located in the usr/bin folder on your Macintosh. For
example, if you want to use FileMerge, browse to usr/bin and select opendiff, which is the
tool that launches FileMerge.
The following table lists common file comparison tools for the Macintosh and the
location of their launch tools or scripts on your hard disk:
If you use

Select the following file

FileMerge

usr/bin/opendiff

BBEdit

usr/bin/bbdiff

TextWrangler

usr/bin/twdiff

N OT E

The usr folder is normally hidden in Finder. However, you can access it with the
Browse button in Dreamweaver.

Related topics
■
“Comparing two files” on page 112
■

“Comparing before putting files” on page 114

■

“Comparing when synchronizing files” on page 115

116

Chapter 4: Managing Your Files

Rolling back files (Contribute users)
Dreamweaver automatically saves multiple versions of a document when you have Contribute
compatibility enabled. To enable Contribute compatibility, see “Preparing a site for use with
Contribute” on page 184.
N OT E

You must have Contribute installed on the same machine as Dreamweaver.

File rollback must also be enabled in Contribute’s administrative settings. For more
information, see Administering Contribute.
To roll back to a previous version of a file:
1.

Right-click (Windows) or Control-click (Macintosh) a file in the Files panel.

2.

Select Roll Back Page.
If there is any previous version of the page to roll back, the Rollback dialog box appears.

3.

Select the version of the page you want to roll back to and click Roll Back.

Related topics
■
“Deleting, moving, or renaming a remote file in a Contribute site” on page 187

Managing files and folders in the Files
panel
You can organize and manage your site files and folders whether they are part of a
Dreamweaver site, on a server you’ve connected to, or on your local drive or desktop.
N OT E

In previous versions of Dreamweaver, the Files panel was called the Site panel.

Related topics
■
“Accessing sites, a server, and local drives” on page 104
■

“Viewing files and folders” on page 108

Managing files and folders in the Files panel

117

Setting preferences for the Files panel
You select preferences to control file-transfer features in the Files panel.
To edit Files panel preferences:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears.

2.

Select Site from the category list on the left.
The Site preference options appear.

3.

Change options as necessary.
For more information, click the Help button in the dialog box.

4.

Click OK.
T IP

118

You can define whether the types of files that you transfer are transferred as ASCII
(text) or binary, by customizing the FTPExtensionMap.txt file in the Dreamweaver/
Configuration folder (on the Macintosh, FTPExtensionMapMac.txt). For more
information see, Extending Dreamweaver.

Chapter 4: Managing Your Files

Working with files in the Files panel
You can open or rename files; add, move, or delete files; or refresh the Files panel after you
make changes.
For Dreamweaver sites, you can also determine which files (on either the local or remote site)
have been updated since the last time they were transferred. For information on synchronizing
the local site with the remote site, see “Synchronizing the files on your local and remote sites”
on page 142.
To open a file:
1.

In the Files panel (Window > Files), select a site, server, or drive from the pop-up menu
(where the current site, server, or drive appears).

2.

Navigate to the file you want to open.

3.

Do one of the following:
■

Double-click the file’s icon.

■

Right-click (Windows) or Control-click (Macintosh) the file’s icon, then select Open.

Dreamweaver opens the file in the Document window.
To create a new file or folder:
1.

In the Files panel (Window > Files), select a file or folder.
Dreamweaver will create the new file or folder inside the currently selected folder, or in the
same folder as the currently selected file.

2.

Right-click (Windows) or Control-click (Macintosh), then select New File or New Folder.

3.

Enter a name for the new file or folder.

4.

Press Enter (Windows) or Return (Macintosh).

To delete a file or folder:
1.

In the Files panel (Window > Files), select the file or folder you want to delete.

2.

Right-click (Windows) or Control-click (Macintosh), then select Delete.

To rename a file or folder:
1.

In the Files panel (Window > Files), select the file or folder you want to rename.

2.

Do one of the following to activate the name of the file or folder:
■
■

Click in the filename, pause, then click again.
Right-click (Windows) or Control-click (Macintosh) the file’s icon, then select
Rename.

Managing files and folders in the Files panel

119

3.

Type the new name over the existing name.

4.

Press Enter (Windows) or Return (Macintosh).

To move a file or folder:
1.

In the Files panel (Window > Files), select the file or folder you want to move.

2.

Do one of the following:

3.

■

Copy the file or folder, then paste it in a new location.

■

Drag the file or folder to a new location.

Refresh the Files panel to see the file or folder in its new location.

To refresh the Files panel, do one of the following:
■

Right-click (Windows) or Control-click (Macintosh) any file or folder, then select
Refresh.

■

(Dreamweaver sites only) Click the Refresh button in the Files panel toolbar (this option
refreshes both panes).
NO TE

Dreamweaver automatically refreshes the Files panel when you make changes in
another application, then return to Dreamweaver.

Related topics
■
“Viewing files and folders” on page 108
■

“Accessing sites, a server, and local drives” on page 104

■

“Setting preferences for the Files panel” on page 118

Finding files in your Dreamweaver site
Dreamweaver makes it easy to find selected, open, checked out, or recently modified files in
your site. You can also find files that are newer in your local or remote site.
To find an open file in your site:
1.

Open the file in the Document window.

2.

Select Site > Locate in Site.

Dreamweaver selects the file in the Files panel.
NO T E
120

If the open file in the Document window is not part of the current site in the Files panel,
Dreamweaver attempts to determine which of your Dreamweaver sites the file belongs
to; if the current file belongs to only one local site, Dreamweaver opens that site in the
Files panel, then highlights the file.

Chapter 4: Managing Your Files

To locate and select checked out files in a Dreamweaver site:
■

In the collapsed Files panel (Window > Files), click the Options menu in the upper-right
corner of the Files panel, then select Edit > Select Checked Out Files.

Dreamweaver selects the files in the Files panel.
To find a selected file in your local or remote site:
1.

Select the file in the Local or Remote view of the Files panel (Window > Files).

2.

Right-click (Windows) or Control-click (Macintosh), then select Locate in Local Site or
Locate in Local Site (depending on where you selected the file).

Dreamweaver selects the file in the Files panel.
To locate and select files that are newer in the local site than in the remote site:
■

In the collapsed Files panel (Window > Files), click the Options menu in the upper-right
corner of the Files panel, then select Edit > Select Newer Local.

Dreamweaver selects the files in the Files panel.
To locate and select files that are newer in the remote site than in the local site:
■

In the collapsed Files panel (Window > Files), click the Options menu in the upper-right
corner of the Files panel, then select Edit > Select Newer Remote.

Dreamweaver selects the files in the Files panel.
To find recently modified files in your site:
1.

In the collapsed Files panel (Window > Files), click the Options menu in the upper-right
corner of the Files panel, and then select Edit > Select Recently Modified.
The Select Recently Modified dialog box appears.

2.

Complete the dialog box.
For more information, click the Help button in the dialog box.

3.

Click OK to save your settings.

Dreamweaver highlights the files that were modified within the selected time frame in the
Files panel.
Related topics
■
“Accessing sites, a server, and local drives” on page 104
■

“Viewing files and folders” on page 108

■

“Working with files in the Files panel” on page 119

Managing files and folders in the Files panel

121

Working with a visual map of your site
You can view a local folder for a Dreamweaver site as a visual map of linked icons, called a site
map. Use the site map to add new files to a Dreamweaver site, or to add, modify, or remove
links.
The site map shows the site structure two levels deep, starting from the home page. It shows
pages as icons and displays links in the order in which they are encountered in the source
code.
The site map is ideal for laying out a site structure. You can quickly set up the entire structure
of the site, then create a graphic image of the site map.
NO TE

The site map applies to local sites only.To create a map of a remote site, copy the
contents of the remote site into a folder on your local disk, then use the Manage Sites
command to define the site as a local site (see “Setting up a local folder” on page 82).

Related topics
■
“Linking documents using the site map” on page 428

Viewing a site map
You must define a home page for your site before you can display the site map. The site’s home
page can be any page in your site; it does not have to be the main page for your site. In this
case, the home page is simply the starting point of the map.
To define a home page for a site:
1.

In the Files panel (Window > Files), select a site from the pop-up menu where the current
site, server, or drive appears.

2.

Right-click (Windows) or Control-click (Macintosh) the file you want to be the home
page, then select Set as Home Page.
NO T E

122

You can also set the home page in the Site Map Layout options in the Site Definition
dialog box (see “Modifying the site map layout” on page 124).

Chapter 4: Managing Your Files

To view a site map:
1.

To display the site map, in the Files panel (Window > Files), do one of the following:
■

■

In the collapsed Files panel, select Map View from the Site View pop-up.

In the expanded Files panel, click the Site Map button in the toolbar, then select Map
Only or Map and Files.

Select Map Only to view the site map without the local file structure, or Site and Map
to view the site map with the local file structure.
N OT E

If you have not defined a home page, or if Dreamweaver can’t find an index.html
or index.htm page in the current site to use as the home page, Dreamweaver
prompts you to select a home page.

The Files panel displays a site map showing the site structure two levels deep.

NO TE

2.

By default, the site map does not display hidden files and dependent files. For more
information, see “Showing and hiding site map files” on page 127.

Click the Plus (+) and Minus (–) next to a filename to show or hide pages linked below the
second level.

Working with a visual map of your site

123

3.

Notice the colors in the site map:
■
■

Text displayed in red indicates a broken link.
Text displayed in blue and marked with a globe icon indicates a file on another site or
a special link (such as an e-mail or script link).

■

A green check mark indicates a file checked out by you.

■

A red check mark indicates a file checked out by someone else.

■

A lock icon indicates a file that is read-only (Windows) or locked (Macintosh).

Related topics
■
“Working with pages in the site map” on page 125
■

“Showing and hiding site map files” on page 127

■

“Viewing the site from a branch” on page 129

Modifying the site map layout
Use the Site Map Layout options to customize the appearance of your site map. You can
change the home page, the number of columns displayed, whether the icon labels display the
filename or the page title, and whether to show hidden and dependent files.
To modify the site map layout:
1.

Do one of the following to open the Site Definition dialog box:
■
■

Select Site > Manage Sites.
In the Files panel, select Manage Sites from the pop-up menu where the current site,
server, or drive appears.

The Manage Sites dialog box appears.
2.

Click Edit.
The Site Definition dialog box appears.

3.

124

Select Site Map Layout from the Category list on the left.

Chapter 4: Managing Your Files

The Site Definition dialog box displays Site Map Layout options.

4.

Make changes as necessary.
For more information, click the Help button in the dialog box.

5.

Click OK to close the Site Definition dialog box.

6.

Click Done to close the Manage Sites dialog box, if it is open.

Related topics
■
“Viewing a site map” on page 122
■

“Showing and hiding site map files” on page 127

■

“Saving the site map” on page 129

Working with pages in the site map
When working in the site map, you can select pages, open a page for editing, add new pages to
the site, create links between files, and change page titles.
To select multiple pages in the site map, do one of the following:
■

Shift-click to select a range of adjacent pages.

■

Starting from a blank part of the view, drag around a group of files to select them.

■

Control-click (Windows) or Command-click (Macintosh) to select nonadjacent pages.

Working with a visual map of your site

125

To open a page in the site map for editing, do one of the following:
■

Double-click the file.

■

Right-click (Windows) or Control-click (Macintosh) the file, then select Open.

To add an existing file to the site, do one of the following:
■

Drag the file from the Windows Explorer or the Macintosh Finder to a file in the site map.
The page is added to the site, and a link is created between it and the file you dragged it
to.

■

Right-click (Windows) or Control-click (Macintosh) the file in the site map, select Link
to Existing File, then browse to the file.

To create a new file and add a link in the site map:
1.

Select a file in the site map.

2.

Right-click (Windows) or Control-click (Macintosh), then select Link to New File.
The Link to New File dialog box appears.

3.

Enter a name, title, and text for the link.

4.

Click OK.
Dreamweaver saves the file in the same folder as the selected file. If you add a new file to a
hidden branch, the new file is also hidden (see “Showing and hiding site map files”
on page 127).

To modify the title of a page in the site map:
1.

Make sure page titles are showing by clicking the Options menu in the upper-right corner
of the collapsed Files panel, then selecting File > Rename View > Show Page Titles.

2.

Select a file in the site map, then do one of the following:

126

■

Click the title. When the title becomes editable, enter a new title.

■

Click the Options menu in the upper-right corner, then select File > Rename.

Chapter 4: Managing Your Files

3.

Press Enter (Windows) or Return (Macintosh) after you type the new name.
N OT E

When you work in the Files panel, Dreamweaver automatically updates all links to
files whose names have changed.

To change the home page in the site map, do one of the following:
■

In the Local view of the Files panel, select a file; right-click (Windows) or Control-click
(Macintosh), then select Set as Home Page.

■

In the Files panel, select Manage Sites from the pop-up menu where the current site,
server, or drive appears, then click Edit. Select Site Map Layout in the Site Definition
dialog box category list. Browse to a new home page, then click OK.

To update the site map display after making changes:
1.

Click anywhere in the site map to deselect any files.

2.

Click the Refresh button in the Files panel toolbar.

Related topics
■
“Viewing a site map” on page 122
■

“Modifying the site map layout” on page 124

■

“Saving the site map” on page 129

Showing and hiding site map files
You can modify the layout of the site map to show or hide hidden and dependent files.
This is useful when you want to emphasize key topics or content, and de-emphasize less
important material.
To hide a file using the site map, you must mark the file as hidden. When you hide a file, its
links are also hidden. When you display a file marked as hidden, the icon and its links are
visible in the site map, but the names appear in italics.
NO T E

By default, dependent files are already hidden.

To mark files as hidden in the site map:
1.

In the site map, select one or more files.

2.

Right-click (Windows) or Control-click (Macintosh), then select Show/Hide Link.

Working with a visual map of your site

127

To unmark files marked as hidden in the site map:
1.

In the site map, select one or more files.

2.

Do one of the following:
■

■

■

Right-click (Windows) or Control-click (Macintosh) in the site map, then select
Show/Hide Link.
In the collapsed Files panel (Window > Files), click the Options menu in the upperright corner, then select View > Show Files Marked as Hidden.
In the collapsed Files panel (Window > Files), click the Options menu in the upperright corner, then select View > Show/Hide Link.

To show or hide files marked as hidden in the site map:
1.

In the collapsed Files panel (Window > Files), click the Options menu in the upper-right
corner.

2.

Do one of the following:
■
■

Select View > Show Files Marked as Hidden.
Select View > Layout to open the Site Definition dialog box, then select the Display
Files Marked as Hidden option.

To show dependent files in the site map:
1.

In the collapsed Files panel (Window > Files), click the Options menu in the upper-right
corner.

2.

Do one of the following:
■
■

Select View > Show Dependent Files.
Select View > Layout to open the Site Definition dialog box, then select the Display
Dependent Files option.

Related topics
■
“Viewing a site map” on page 122
■

“Modifying the site map layout” on page 124

■

“Working with pages in the site map” on page 125

■

“Saving the site map” on page 129

128

Chapter 4: Managing Your Files

Viewing the site from a branch
You can view the details of a specific section of a site by making a branch the focus of the site
map.
To view a different branch in the site map:
1.

Select the page you want to view.

2.

Do one of the following:
■

■

Right-click (Windows) or Control-click (Macintosh) in the site map, then select View
as Root.
In the collapsed Files panel (Window > Files), click the Options menu in the upperright corner, then select View > View as Root.

The site map is redrawn in the window as if the specified page were at the root of the site. The
Site Navigation text box above the site map displays the path from the home page to the
specified page. Select any item in the path to view the site map from that level by clicking
once.
To expand and contract branches in the site map:
■

Click a branch’s Plus (+) or Minus (–) button.

Related topics
■
“Viewing a site map” on page 122
■

“Modifying the site map layout” on page 124

■

“Working with pages in the site map” on page 125

Saving the site map
You can save the site map as an image, then view the image in (or print it from) an image
editor.
To create an image file of the current site map:
1.

In the collapsed Files panel (Window > Files), click the Options menu in the upper-right
corner, then select File > Save Site Map.

The Save Site Map dialog box appears.

Working with a visual map of your site

129

2.

Enter a name in the File Name text box.

3.

In the File Type pop-up menu, select .bmp or .png.

4.

Select a location to save the file, then enter a name for the image.

5.

Click Save.

Related topics
■
“Viewing a site map” on page 122
■

“Modifying the site map layout” on page 124

■

“Working with pages in the site map” on page 125

Importing and exporting sites
You can export a site as an XML file that contains the site’s settings, and import the site into
Dreamweaver later. This enables you to move sites between machines and product versions or
to share the settings with other users.
TIP

It’s a good idea to export your sites regularly so that you have a backup copy if anything
happens to the site.

To export your sites:
1.

Select Site > Manage sites.
The Manage Sites dialog box appears.

2.

Select one or more sites to export, and then click the Export button.
To select more than one sites, Control-click (Windows) or Command-click (Macintosh)
each site. To select a range of sites, Shift-click the first and last site in the range.

3.

For each site you want to export, browse to a location where you want to save the site and
click Save.
If you export a site that specifies a user name and password for a remote server,
Dreamweaver asks whether you want to back up your settings or if you want to share the
settings with other users. If you want to share your settings with other users, select the
second option and click OK. Dreamweaver does not save information that would not
work for other users, such as your remote server login information and local paths.
Dreamweaver saves each site as an XML file, with an .ste file extension, in the
specified location.

4.

130

Click Done to close the Manage Sites dialog box.

Chapter 4: Managing Your Files

To import sites:
1.

Select Site > Manage sites.
The Manage Sites dialog box appears.

2.

Click the Import button.
The Import Site dialog box appears.

3.

Browse to and select one or more sites—defined in files with an .ste file extension—to
import.
To select more than one sites, Control-click (Windows) or Command-click (Macintosh)
each .ste file. To select a range of sites, Shift-click the first and last file in the range.

4.

Click Open to start importing the sites.
After Dreamweaver imports the sites, the site names appear in the Manage Sites dialog
box.

5.

Click Done to close the Manage Sites dialog box.

Removing a Dreamweaver site from your
list of sites
If you no longer want to work with a site in Dreamweaver, you can remove the site from your
list of sites. The files in the site are not removed.
N OT E

When you remove a site from the list, all setup information about the site is permanently
lost.

To remove a site from your site list:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Select a site name.

3.

Click Remove.
A dialog box appears asking you to confirm the removal.

4.

Click Yes to remove the site from your list, or click No to leave the site name.
If you click Yes, the site name disappears from the list.

5.

Click Done to close the Manage Sites dialog box.

Removing a Dreamweaver site from your list of sites

131

Checking in and checking out files
If you’re working in a collaborative environment, you can use the Check In/Check Out
system to check files in and out from local and remote servers.
If you’re the only person working on the remote server, you can use the Put and Get
commands without checking files in or out (see “Getting and putting files to and from your
server” on page 138).
This section covers the following topics:
■

“Setting up the Check In/Check Out system” on page 132

■

“Using WebDAV to check in and check out files” on page 134

■

“Checking files into and out of a remote folder” on page 135

■

“Undoing a file check-out” on page 137

Related topics
■
“About the Check In/Check Out system” on page 100

Setting up the Check In/Check Out system
Before you can use the Check In/Check Out system, you must associate your local site with a
remote server (see “Setting up a remote folder” on page 83).
To set up the Check In/Check Out system:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Select a site, then click Edit.
The Site Definition dialog box appears.

3.

Select Remote Info from the category list on the left.
The Site Definition dialog box displays Remote Info options. The Check In/Out section
appears at the bottom of the dialog box.

4.

132

Select the Enable File Check In and Check Out option.

Chapter 4: Managing Your Files

Additional options appear.

NO T E

5.

If you do not see Check In/Out options, you have not set up your remote server (see
“Setting up a remote folder” on page 83).

Complete the Check In/Out section.
For more information, click the Help button in the dialog box.

6.

Click OK.

Related topics
■
“About the Check In/Check Out system” on page 100
■

“Checking files into and out of a remote folder” on page 135

■

“Undoing a file check-out” on page 137

Checking in and checking out files

133

Using WebDAV to check in and check out files
Dreamweaver can connect to a server that uses WebDAV (Web-based Distributed Authoring
and Versioning), which is a set of extensions to the HTTP protocol that allow users to
collaboratively edit and manage files on remote web servers. For more information, see
www.webdav.org.
To set up WebDAV access in Dreamweaver:
1.

If you have not already done so, define a Dreamweaver site that specifies the local folder
you use to store your project files.
For more information, see “Setting up a local folder” on page 82.

2.

Select Site > Manage Sites, and then double-click your site in the list.
The Site Definition dialog box appears.

3.

If the Basic tab is selected, click the Advanced tab.

4.

Click the Remote Info category, and then select WebDAV from the Access pop-up menu.

134

Chapter 4: Managing Your Files

5.

Specify how Dreamweaver should connect to your WebDAV server.
For instructions, click the Help button in the dialog box.

6.

Select the Enable File Check in and Check Out option and enter the following
information:
■

■

In the Check Out Name text box, enter a name identifying you to other team
members.
In the Email Address text box, enter your e-mail address.

The name and e-mail addresses are used to identify ownership on the WebDAV server and
appear in the Files panel for contact purposes.
7.

Click OK.
Dreamweaver configures the site for WebDAV access.

To check in and check out files using WebDAV:
■

Use the standard check-in and check-out methods described in the following section.
When you use the Check In or Check Out command on any site file, Dreamweaver
transfers the file using WebDAV.

Checking files into and out of a remote folder
After you set up the Check In/Check Out system (see “Setting up the Check In/Check Out
system” on page 132), you can check in and check out files on a remote server using the Files
panel or from the Document window.
To check out files using the Files panel:
1.

In the Files panel (Window > Files), select files to check out from the remote server.
N OT E

You can select files in the Local or Remote view, not the Testing Server view.

A red check mark indicates that another team member has the file checked out and a lock
symbol indicates that the file is read-only (Windows) or locked (Macintosh).
2.

Do one of the following to check out the file(s):
■
■

Click the Check Out button in the Files panel toolbar.
Right-click (Windows) or Control-click (Macintosh), then select Check Out from the
context menu.

The Dependent Files dialog box appears.

Checking in and checking out files

135

3.

Click Yes to download dependent files along with the selected files, or click No to refrain
from downloading dependent files.
NO T E

It’s usually a good idea to download dependent files when checking out a new file,
but if the latest versions of the dependent files are already on the local disk, there’s
no need to download them again.

A green check mark appears beside the local file’s icon indicating that you have checked it
out.
To check in files using the Files panel:
1.

In the Files panel (Window > Files), select checked-out or new file(s).
NO T E

2.

You can select files in the Local or Remote view, but not the Testing Server view.

Do one of the following to check in the file(s):
Click the Check In button in the Files panel toolbar.

■

Right-click (Windows) or Control-click (Macintosh), then select Check In from the
context menu.

■

The Dependent Files dialog box appears.
3.

Click Yes to download dependent files along with the selected files, or click No to refrain
from downloading dependent files.
N OT E

It’s usually a good idea to upload dependent files when checking in a new file, but if
the latest versions of the dependent files are already on the remote server, there’s no
need to upload them again.

A lock symbol appears beside the local file’s icon indicating that the file is now read-only.
To check in or check out an open file from the Document window:
1.

Make sure the file you want to check in or out is active in the Document window.
NO T E

2.

Do one of the following:
■

136

You can check in only one open file at a time.

Select Site > Check In or Site > Check Out.

Chapter 4: Managing Your Files

■

Click the File Management icon in the Document window toolbar, then select Check
In or Check Out from the pop-up menu.
N OT E

If the current file is not part of the current site in the Files panel, Dreamweaver
attempts to determine which locally defined site the current file belongs to. If the
current file belongs to only one local site, Dreamweaver opens that site, then
performs the check in or check out operation.

If you check out the currently active file, the currently open version of the file is overwritten
by the new checked-out version. If you check in the currently active file, the file may be
automatically saved before it’s checked in, depending on the preference options you’ve set (see
“Setting preferences for the Files panel” on page 118).
Related topics
■
“About the Check In/Check Out system” on page 100
■

“Setting up the Check In/Check Out system” on page 132

Undoing a file check-out
If you check out a file, then decide not to edit it (or decide to discard the changes you made),
you can undo the check-out operation and the file returns to its original state.
To undo a file check-out, do one of the following:
■

Open the file in the Document window, then select Site > Undo Check Out.

■

In the Files panel (Window > Files), right-click (Windows) or Control-click (Macintosh),
then select Undo Check Out.
The local copy of the file becomes read-only, and any changes you’ve made to it are lost.

Related topics
■
“About the Check In/Check Out system” on page 100
■

“Setting up the Check In/Check Out system” on page 132

■

“Checking files into and out of a remote folder” on page 135

Checking in and checking out files

137

Getting and putting files to and from your
server
If you’re working in a collaborative environment, use the Check In/Check Out system to
transfer files between local and remote sites (see “Checking in and checking out files”
on page 132). If you’re the only person working on the remote site, however, you can use the
Get and Put commands to transfer files without checking them in or out.

Getting files from a remote server
Use the Get command to copy files from the remote site to your local site. You can use the
Files panel or the Document window to get files.
Dreamweaver creates a log of file activity during the transfer. To view or save this log, see
“Managing file transfers” on page 142.
Dreamweaver also records all FTP file transfer activity. If an error occurs when you are
transferring a file using FTP, the Site FTP log can help you determine the problem.
To get files from a remote server using the Files panel:
1.

In the Files panel (Window > Files), select the desired files to download.
Usually you select these files in the Remote view, but you can select the corresponding files
in the Local view if you prefer. If the Remote view is active, then Dreamweaver copies the
selected files to the local site; if the Local view is active, then Dreamweaver copies the
remote versions of the selected local files to the local site.
N OT E

2.

To get only those files for which the remote version is more recent than the local
version, use the Synchronize command (see “Synchronizing the files on your local
and remote sites” on page 142).

Do one of the following to get the file:
Click the Get button in the Files panel toolbar.

■

Right-click (Windows) or Control-click (Macintosh) the file in the Files panel, then
select Get from the context menu.

■

The Dependent files dialog box appears.
3.

To download dependent files, click Yes; to skip them, click No.
NO T E

138

If you already have local copies of the dependent files, click No.

Chapter 4: Managing Your Files

Dreamweaver downloads the selected files, as follows:
■

■

If you’re using the Check In/Check Out system, getting a file results in a read-only
local copy of the file; the file remains available on the remote site or testing server for
other team members to check out (see “Checking in and checking out files”
on page 132).
If you’re not using the Check In/Check Out system, getting a file transfers a copy that
has both read and write privileges.
N OT E

If you’re working in a collaborative environment—that is, if others are working on
the same files—you should not disable Enable File Check In and Check Out. If
other people are using the Check In/Check Out system with the site, you should
use that system as well.

To stop the file transfer at any time, click the Cancel button in the status dialog box. The
transfer may not stop immediately.
To get a file from a remote server using the Document window:
1.

Make sure the document is active in the Document window.

2.

Do one of the following to get the file:
■
■

Select Site > Get.
Click the File Management icon in the Document window toolbar, then select Get
from the pop-up menu.
N OT E

If the current file is not part of the current site in the Files panel, Dreamweaver
attempts to determine which locally defined site the current file belongs to. If the
current file belongs to only one local site, Dreamweaver opens that site, then
performs the Get operation.

To display the FTP log:
■

Click the Options menu in the upper-right corner of the Files panel, then select View >
Site FTP Log.

Related topics
■
“About the Check In/Check Out system” on page 100
■

“About background file transfers” on page 101

Getting and putting files to and from your server

139

Putting files on a remote server
You can put files from the local site to the remote site, generally without changing the file’s
checked out status.
There are two common situations in which you might use the Put command instead of Check
In:
■

You’re not in a collaborative environment and you aren’t using the Check In/Check
Out system.

■

You want to put the current version of the file on the server but you’re going to keep
editing it.
NO TE

If you put a file that didn’t previously exist on the remote site and you’re using the
Check In/Check Out system, the file is copied to the remote site and is then checked
out to you so that you can continue editing.

You can use the Files panel or the Document window to put files. Dreamweaver creates a log
of file activity during the transfer. To view or save this log, see “Managing file transfers”
on page 142.
Dreamweaver also records all FTP file transfer activity. If an error occurs when you are
transferring a file using FTP, the Site FTP log can help you determine the problem.
To put files on a remote or testing server using the Files panel:
1.

In the Files panel (Window > Files), select the files to upload.
Usually you select these in the Local view, but you may select the corresponding files in
the Remote view if you prefer.
N OT E

2.

To put only those files for which the local version is more recent than the remote
version, see “Synchronizing the files on your local and remote sites” on page 142.

Do one of the following to put the file:
■
■

Click the Put button in the Files panel toolbar.
Right-click (Windows) or Control-click (Macintosh) the file in the Files panel, then
select Put from the context menu.

If the file hasn’t been saved, a dialog box may appear (depending on your preference
setting in the Site category of the Preferences dialog box) allowing you to save the file
before putting it on the remote server.

140

Chapter 4: Managing Your Files

3.

If a dialog box appears, click Yes to save the file or No to put the previously saved version
on the remote server.
NO T E

If you do not save the file, any changes you’ve made since the last time you saved will
not be put onto the remote server. However, the file remains open, so you can still
save the changes after putting the file on the server if you want.

The Dependent Files dialog box appears.
4.

To upload dependent files, click Yes; to skip them, click No.
NO T E

If the remote site already contains copies of the dependent files, click No.

To stop the file transfer click the Cancel button in the status dialog box. The transfer may not
stop immediately.
To put files on a remote server using the Document window:
1.

Make sure the document is active in the Document window.

2.

Do one of the following to put the file:
■
■

Select Site > Put.
Click the File Management icon in the Document window toolbar, then select Put
from the pop-up menu.
NO T E

If the current file is not part of the current site in the Files panel, Dreamweaver
attempts to determine which locally defined site the current file belongs to. If the
current file belongs to only one local site, Dreamweaver opens that site, then
performs the Put operation.

To display the FTP log:
■

Click the Options menu in the upper-right corner of the Files panel, then select View >
Site FTP Log.

Related topics
■
“About the Check In/Check Out system” on page 100
■

“Getting files from a remote server” on page 138

■

“About background file transfers” on page 101

Getting and putting files to and from your server

141

Managing file transfers
You can view the status of file transfer operations, as well as a list of transferred files and their
outcomes (transfer successful, skipped, or transfer failed). You can also save a log of the file
activity.
NO TE

Dreamweaver lets you perform other non-server-related activities while you’re
transferring files to or from a server. For more information, see “About background file
transfers” on page 101.

To cancel a file transfer:
■

Click the Cancel button or close the Background File Activity dialog box.

To hide the Background File Activity dialog box during transfers:
■

Click the Hide button on the Background File Activity dialog box.

To view details of the last file transfer:
1.

Click the Log button at the bottom of the Files panel to open the Background File Activity
dialog box.

2.

Click the Details expander arrow.

To save a log of the last file transfer:
1.

Click the Log button at the bottom of the Files panel to open the Background File Activity
dialog box.

2.

Click the Save Log button and save the information as a text file.

You can review the file activity by opening the log file in Dreamweaver or in any text editor.
Related topics
■
“Getting and putting files to and from your server” on page 138

Synchronizing the files on your local and
remote sites
Once you’ve created files in your local and remote sites, you can synchronize the files between
the two sites.
N O TE
142

If your remote site is an FTP server (rather than a networked server), then synchronizing
your files uses FTP.

Chapter 4: Managing Your Files

Before you synchronize your sites, you can verify which files you want to put, get, delete, or
ignore. Dreamweaver also confirms which files have been updated after you complete the
synchronization.
To see which files are newer on the local site or the remote site, without
synchronizing, do one of the following:
■

In the upper-right corner of the Files panel, click the Options menu, and then select Edit
> Select Newer Local or Select > Select Newer Remote.

■

In the Files panel, right-click (Windows) or Control-click (Macintosh), and then select
Select > Newer Local or Select > Newer Remote.

To synchronize your files:
1.

In the Files panel (Window > Files), select a site from the pop-up menu where the current
site, server, or drive appears.

2.

(Optional) Select specific files or folders.
If you want to synchronize the entire site, skip this step.

3.

Click the Options menu in the upper-right corner of the Files panel and select Site >
Synchronize.
The Synchronize Files dialog box appears.

4.

Complete the dialog box.
For more information, click the Help button in the dialog box.

5.

Click the Preview button.
Dreamweaver displays the files that will be synchronized, and lets you change the actions
(put, get, delete, and ignore) for those files before executing the synchronization. If all of
your files are already in sync, Dreamweaver lets you know that no synchronization is
necessary.
For more information, click the Help button in the dialog box.

Synchronizing the files on your local and remote sites

143

Related topics
■
“Checking files into and out of a remote folder” on page 135
■

“Getting files from a remote server” on page 138

■

“Putting files on a remote server” on page 140

■

“Comparing files for differences” on page 111

Identifying and deleting unused files
You can identify and delete files that are no longer used by other files in your site.
To identify and delete unused files:
1.

Select Site > Check Links Sitewide.
Dreamweaver checks all the links in your site and displays the broken ones in the Results
panel.

2.

Select Orphaned Files from the pop-up menu on the Link Checker panel.
Dreamweaver displays all the files with no incoming links. This means that no files in
your site link to these files.

3.

Select the files you want to delete and press Delete (Windows) or Command+Delete
(Macintosh).
C AU T I ON

Although no other file in the site links to these files, some of the listed files may link to
other files. Use caution when deleting the files.

Related topics
■
“Checking for broken, external, and orphaned links” on page 447

Cloaking folders and files in your site
Site cloaking enables you to exclude folders and file types in a site from sitewide operations
such as Get or Put.
Related topics
■
“About site cloaking” on page 101
■

144

“Identifying and deleting unused files” on page 144

Chapter 4: Managing Your Files

Enabling and disabling site cloaking
Site cloaking is enabled by default. You can disable cloaking permanently or just temporarily
to perform an operation on all files, including cloaked files. When you disable site cloaking,
all cloaked files are uncloaked. When you enable site cloaking again, any previously cloaked
files become cloaked again.
N OT E

You can also use the Uncloak All option to uncloak all files, but this does not disable
cloaking; also there is no way to re-cloak all folders and files that were previously
cloaked, except to set cloaking again for each folder and file type.

To enable or disable site cloaking:
1.

In the Files panel (Window > Files), select a select a site from the pop-up menu where the
current site, server, or drive appears.

2.

Select a file or folder.

3.

Right-click (Windows) or Control-click (Macintosh), then do one of the following:
■
■

Select Enable/Disable Cloaking.
Select Settings, then select Cloaking from the category list on the left in the Advanced
Site Definition dialog box. Select or deselect Enable Cloaking, then click OK.

Cloaking is enabled or disabled for the site.
Related topics
■
“About site cloaking” on page 101
■

“Cloaking and uncloaking specific file types” on page 146

■

“Uncloaking all folders and files” on page 148

Cloaking and uncloaking site folders
You can cloak specific folders, but you cannot cloak all folders or an entire site. When you
cloak specific folders, you can cloak multiple folders at the same time.
To cloak or uncloak specific folders within a site:
1.

In the Files panel (Window > Files), select a select a site that has site cloaking enabled from
the pop-up menu where the current site, server, or drive appears.

2.

Select the folder(s) you want to cloak or uncloak.

3.

Right-click (Windows) or Control-click (Macintosh), then select Cloaking > Cloak or
Cloaking > Uncloak from the context menu.

Cloaking folders and files in your site

145

A red line through the folder icon appears or disappears, indicating that the folder is cloaked
or uncloaked.
NO T E

You can perform an operation on a specific cloaked folder by selecting the item in the
Files panel and performing an operation on it. Performing an operation directly on a file
or folder overrides cloaking.

Related topics
■
“About site cloaking” on page 101
■

“Enabling and disabling site cloaking” on page 145

■

“Uncloaking all folders and files” on page 148

Cloaking and uncloaking specific file types
You can indicate specific file types to cloak, so that Dreamweaver cloaks all files ending with a
specified pattern. For example, you can cloak all files ending with the .txt extension. The file
types that you enter do not have to be file extensions; they can be any pattern at the end of a
filename.
To cloak specific file types within a site:
1.

In the Files panel (Window > Files), select a select a site that has site cloaking enabled from
the pop-up menu where the current site, server, or drive appears.

2.

Right-click (Windows) or Control-click (Macintosh), then select Settings.
The Site Definition dialog box displays the Cloaking options.

146

Chapter 4: Managing Your Files

3.

Select the Cloak Files Ending With checkbox.

4.

Enter the file types to cloak in the text box.
For example, you might enter .jpg to cloak all files with names ending in .jpg in your site.
NO T E

5.

Separate multiple file types with one space; do not use a comma or semicolon.

Click OK.

A red line appears through the affected files, indicating that they are cloaked.
TIP

Some software creates backup files ending in a particular suffix, such as .bak. You can
cloak such files.

NO T E

You can perform an operation on a specific cloaked folder by selecting the item in the
Files panel and performing an operation on it. Performing an operation directly on a file
or folder overrides cloaking.

To uncloak specific file types within a site:
1.

In the Files panel (Window > Files), select a select a site that has site cloaking enabled from
the pop-up menu where the current site, server, or drive appears.

2.

Right-click (Windows) or Control-click (Macintosh), then select Cloaking > Settings.
The Advanced Site Definition dialog box appears.

3.

Do one of the following:
■

■

4.

Deselect the Cloak Files Ending With checkbox to uncloak all the file types listed in
the text box.
Delete specific file types from the text box to uncloak those file types.

Click OK.
The red lines disappear from the affected files, indicating that they are uncloaked.

Related topics
“About site cloaking” on page 101

■
■

“Enabling and disabling site cloaking” on page 145

■

“Cloaking and uncloaking site folders” on page 145

Cloaking folders and files in your site

147

Uncloaking all folders and files
You can uncloak all folders and files in a site at the same time. This action cannot be undone;
there is no way to re-cloak all items that were previously cloaked. You have to re-cloak
items individually.
TI P

If you want to temporarily uncloak all folders and files, then re-cloak those items, disable
site cloaking (see “Enabling and disabling site cloaking” on page 145).

To uncloak all folders and files within a site:
1.

In the Files panel (Window > Files), select a select a site that has site cloaking enabled from
the pop-up menu where the current site, server, or drive appears.

2.

Select any file or folder in that site.

3.

Right-click (Windows) or Control-click (Macintosh), then select Cloaking > Uncloak All.
NO TE

This step also deselects the Cloak Files Ending With checkbox in the Site >
Cloaking > Settings.

The red lines through folder and file icons disappear, indicating that all files and folders in the
site are uncloaked.
Related topics
■
“About site cloaking” on page 101
■

“Enabling and disabling site cloaking” on page 145

■

“Cloaking and uncloaking site folders” on page 145

■

“Cloaking and uncloaking specific file types” on page 146

Storing file information in Design Notes
Design Notes are notes associated with a file, but stored in a separate file. Use Design Notes to
keep track of extra file information associated with your documents, such as image sourcefilenames and comments on file status.
Related topics
■
“About Design Notes” on page 102

148

Chapter 4: Managing Your Files

Enabling and disabling Design Notes for a site
You enable and disable Design Notes for a site in the Design Notes category of the Site
Definition dialog box. When you enable Design Notes, you can choose to use them locally
only, if you want.
To enable or disable Design Notes for your site or to use Design Notes locally:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Select a site, then click Edit.
The Site Definition dialog box appears.

3.

Select Design Notes from the Category list on the left.
The Site Definition dialog box displays the Design Notes options.

4.

Complete the dialog box.
For more information, click the Help button in the dialog box.

5.

Click OK.

Related topics
■
“About Design Notes” on page 102
■

“Working with Design Notes” on page 151

Storing file information in Design Notes

149

Associating Design Notes with files
You can create a Design Notes file for each document or template in your site. You can also
create Design Notes for applets, ActiveX controls, images, Flash content, Shockwave objects,
and image fields in your documents.
NO TE

If you add Design Notes to a template file, documents you create with the template do
not inherit the Design Notes.

To add Design Notes to a document:
1.

Do one of the following:
■
■

Open the file in the Document window, then select File > Design Notes.
In the Files panel, right-click (Windows) or Control-click (Macintosh) the file, then
select Design Notes.
N OT E

If the file resides on a remote site, you must first check out or get the file, then
select it in the local folder (see “Checking files into and out of a remote folder”
on page 135 or “Getting and putting files to and from your server” on page 138).

The Design Notes dialog box appears.

2.

Complete the dialog box.
For more information, click the Help button in the dialog box.

3.

Click OK to save the notes.
Dreamweaver saves your notes to a folder called _notes, in the same location as the current
file. The filename is the document’s filename, plus the extension .mno.
For example, if the filename is index.html, the associated Design Notes file is named
index.html.mno.

150

Chapter 4: Managing Your Files

Related topics
■
“About Design Notes” on page 102
■

“Enabling and disabling Design Notes for a site” on page 149

Working with Design Notes
After you associate a Design Note with a file (see “Associating Design Notes with files”
on page 150), you can open the Design Note, change its status, or delete it.
To open Design Notes associated with a file, do one of the following:
■

Open the file in the Document window, then select File > Design Notes.

■

In the Files panel, right-click (Windows) or Control-click (Macintosh) the file, then select
Design Notes.

■

In the Notes column of the Files panel, double-click the yellow Design Notes icon.

To assign a custom Design Notes status:
1.

Open Design Notes for a file or object (see the previous procedure).

2.

Click the All Info tab.

3.

Click the Plus (+) button.

4.

In the Name field, enter the word status.

5.

In the Value field, enter the status.
If a status value already existed, it’s replaced with the new one.

6.

Click the Basic Info tab and note that the new status value appears in the Status pop-up
menu.
N OT E

You can have only one custom value in the status menu at a time. If you follow this
procedure again, Dreamweaver replaces the status value you entered the first time
with the new status value you enter.

To delete unassociated Design Notes from your site:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Select the site, then click Edit.
The Site Definition dialog box appears.

3.

Select Design Notes from the category list on the left.

Storing file information in Design Notes

151

4.

Click the Clean Up button.
Dreamweaver prompts you to verify that it should delete any Design Notes that are no
longer associated with a file in your site.
If you use Dreamweaver to delete a file that has an associated Design Notes file,
Dreamweaver deletes the Design Notes file too; so usually orphan Design Notes files
occur only if you delete or rename a file outside of Dreamweaver.
N OT E

If you deselect the Maintain Design Notes option before you click Clean Up,
Dreamweaver deletes all Design Notes files for your site.

Related topics
■
“About Design Notes” on page 102
■

“Enabling and disabling Design Notes for a site” on page 149

Testing your site
Dreamweaver provides several features to help you test your site, including previewing pages
and checking for browser compatibility. You can also run various reports, such as a broken
links report.

Site testing guidelines
Before uploading your site to a server and declaring it ready for viewing, it’s a good idea to test
it locally. (In fact, it’s a good idea to test and troubleshoot your site frequently throughout its
construction—you can catch problems early and avoid repeating them.)
You should make sure that your pages look and work as expected in the browsers you’re
targeting, that there are no broken links, and that the pages don’t take too long to download.
You can also test and troubleshoot your entire site by running a site report.
The following guidelines will help you create a good experience for visitors to your site:
■

Make sure your pages function as expected in the browsers you’re targeting and that they
either work or “fail gracefully” in other browsers.
Your pages should be legible and functional in browsers that do not support styles, layers,
plug-ins, or JavaScript (see “Checking for browser compatibility” on page 575). For pages
that fail badly in older browsers, consider using the Check Browser behavior to
automatically redirect visitors to another page (see “Check Browser” on page 499).

152

Chapter 4: Managing Your Files

■

Preview your pages in as many different browsers and on as many different platforms
as possible.
This gives you an opportunity to see differences in layout, color, font sizes, and default
browser window size that cannot be predicted in a target browser check (see “Previewing
and testing pages in browsers” on page 361).

■

Check your site for broken links, then fix them.
Other sites undergo redesign and reorganization too, and the page you’re linking to may
have been moved or deleted. You can run a link check report to test your links (see
“Checking for broken, external, and orphaned links” on page 447 and “Fixing broken
links” on page 448).

■

Monitor the file size of your pages and the time they take to download (see “Setting
download time and size preferences” on page 364).
Keep in mind that if a page consists of one large table, in some browsers, visitors will see
nothing until the entire table finishes loading. Consider breaking up large tables; if this is
not possible, consider putting a small amount of content—such as a welcome message or
an advertising banner—outside the table at the top of the page so users can view this
material while the table downloads.

■

Run a few site reports to test and troubleshoot the entire site.
You can check your entire site for problems, such as untitled documents, empty tags, and
redundant nested tags (see “Testing your site” on page 152).

■

Validate your code to locate tag or syntax errors (see “Validating your tags” on page 578).

■

Once the bulk of the site has been published, continue to update and maintain it.
Publishing your site—that is, making it live—can be accomplished in several ways and is
an ongoing process. An important part of the process is defining and implementing a
version-control system, either with the tools Dreamweaver includes or through an external
version-control application.

■

Use the Dreamweaver discussion forums found on the Macromedia website at
www.macromedia.com/go/dreamweaver_newsgroup.
The forums are a great resource for getting information on different browsers, platforms,
and so on. You can also discuss technical issues and share helpful hints with other
Dreamweaver users.

Testing your site

153

Using reports to test your site
You can run site reports on workflow or HTML attributes, including accessibility, for the
current document, selected files, or the entire site.
Workflow reports can improve collaboration among members of a web team. You can run
workflow reports that display who has checked out a file, which files have Design Notes
associated with them, and which files have been modified recently. You can further refine
Design Note reports by specifying name/value parameters.
NO TE

You must have a remote site connection defined to run the workflow reports. To define a
remote site, see “Setting up a remote folder” on page 83.

HTML reports enable you to compile and generate reports for several HTML attributes. You
can check combinable nested font tags, accessibility, missing Alt text, redundant nested tags,
removable empty tags, and untitled documents.
After you run a report, you can save it as an XML file, then import it into a template instance
or a database or spreadsheet and print it, or display it on a website.
NO TE

You can also add different report types to Dreamweaver through the Macromedia
Dreamweaver Exchange website (see “Adding extensions to Dreamweaver”
on page 75).

To use the Reports command to check links in your site, see “Checking for broken, external,
and orphaned links” on page 447.
To run reports to test a site:
1.

Select Site > Reports.
TI P

154

If you want to run only an accessibility report for your site, you can select File > Check
Page > Check Accessibility and the report appears in the Site Reports panel of the
Results panel group.

Chapter 4: Managing Your Files

The Reports dialog box appears.

2.

Select a category to report on and a report type to run.
For more information, click the Help button in the dialog box.

3.

Click Run to create the report.
Depending on the type of report you run, you might be prompted to save your file, define
your site, or select a folder (if you haven’t already done so).
A list of results appears in the Site Reports panel (in the Results panel group).

To use and save a report:
1.

Run a report (see the previous procedure).

2.

In the Site Reports panel, do any of the following to view the report:
■

Click the column heading you want to sort results by.
You can sort by filename, line number, or description. You can also run several
different reports and keep the different reports open.

■

Select any line in the report, then click the More Info button on the left side of the
Site Reports panel for an description of the problem.
The information appears in the Reference panel.

■

Double-click any line in the report to view the corresponding code in the
Document window.
NO TE

If you are in Design view, Dreamweaver changes the display to split view to show
the reported problem in code.

Testing your site

155

3.

Click Save Report to save the report.
When you save a report, you can import it into an existing template file. You can then
import the file into a database or spreadsheet and print it, or use the file to display the
report on a website.
TI P

After running HTML reports, use the Clean Up HTML command to correct any
HTML errors the reports listed (see “Cleaning up your code” on page 573).

Related topics
■
“Reports in Dreamweaver” on page 47

156

Chapter 4: Managing Your Files

CHAPTER 5

5

Managing Site Assets
and Libraries
As you develop websites, you accumulate a growing number of assets. In some cases, you
might use the same assets across multiple sites, or perhaps you have a set of favored assets that
you use in all your sites. You can use Macromedia Dreamweaver 8 to manage your site assets.
You can easily keep track of and preview several kinds of assets that you have stored in your
site, such as images, movies, colors, scripts, and links. You can also drag an asset directly to
your current document to insert it in a page.
Dreamweaver also provides access to two special types of assets—libraries and templates.
Library items and templates are linked assets: editing a library item or template updates all
documents in which these assets have been applied. Library items are intended for individual
design elements, such as a site’s copyright information or a logo. Templates let you control a
larger design area. (For more information, see Chapter 11, “Managing Templates,” on
page 295.)
The following topics are covered in this chapter:
About library items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Working with assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
Creating and managing a list of favorite assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Working with library items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

About library items
A library is a special Dreamweaver file that contains a collection of individual assets or copies
of assets you have created for placement in your web pages. These assets in a library are called
library items. You can update all the pages that use a library item whenever you change the
item’s contents. You can store all sorts of page elements, such as images, tables, sounds, and
Flash files in a library.

159

Here’s an example of how you might use a library item: suppose you’re building a large site for
a company. The company has a slogan that it wants to appear on every page of the site, but
the marketing department is still finalizing the text of the slogan. If you create a library item
to contain the slogan and use that library item on every page, then when the marketing
department provides the final slogan, you can change the library item and automatically
update every page that uses it.
Dreamweaver stores library items in a Library folder within the local root folder for each site.
Each site has its own library.
NO T E

If the library item contains links, the links may not work in the new site. Also, images in a
library item aren’t copied to the new site.

When you use a library item, Dreamweaver doesn’t insert the library item in the web page;
rather it inserts a link to the library item. That is, Dreamweaver inserts a copy of the HTML
source code for that item into the document, and adds an HTML comment containing a
reference to the original, external item.
The reference to the external library item makes it possible to update the content on an entire
site all at once by changing the library item and then using the update commands in the
Modify > Library submenu. Then, if you need to change some text for example, or an image,
updating the library item automatically updates the instance of the library in any page in
which you’ve inserted the library item.
When you create a library item that includes an element with a Dreamweaver behavior
attached to it, Dreamweaver copies the element and its event handler (the attribute that
specifies which event triggers the action, such as onClick, onLoad, or onMouseOver, and
which action to call when the event occurs) to the library item file. Dreamweaver does not
copy the associated JavaScript functions into the library item. Instead, when you insert the
library item into a document, Dreamweaver automatically inserts the appropriate JavaScript
functions into the head section of that document (if they aren’t already there).
N O TE

If you hand-code JavaScript (that is, if you create it without using Dreamweaver
behaviors), you can make it part of a library item if you use the Call JavaScript behavior
to execute the code. If you don’t use a Dreamweaver behavior to execute the code, the
code isn’t retained as part of the library item.

There are special requirements for editing the behaviors in library items (see “Editing a
behavior in a library item” on page 178). Library items cannot contain style sheets, because
the code for those elements is part of the head section.

160

Chapter 5: Managing Site Assets and Libraries

Related topics
■

“Working with library items” on page 172

Working with assets
Assets include a variety of elements that you store in a site, such as an image or movie file.
You can obtain assets from various sources. For example, you might create assets in an
application such as Macromedia Fireworks or Macromedia Flash, receive them from a coworker, or copy them from a clip-art CD or graphics website.
Related topics
■
“Creating and managing a list of favorite assets” on page 168
■

“Working with library items” on page 172

Viewing assets in the Assets panel
You can view and manage assets in the current site using the Assets panel. The Assets panel
displays assets for the site associated with the active document in the Document window.
NO TE

You must define a local site before you can view assets in the Assets panel. For more
information about setting up a site, see “Setting up a new Dreamweaver site”
on page 82.

The Assets panel provides two views:
The Site list shows all of the assets in your site, including colors and URLs that are used in
any document in your site.
The Favorites list

shows only the assets you’ve explicitly chosen.

In both lists, assets are divided into categories (along the left side of the Assets panel). The Site
list and the Favorites list are both available for all categories of assets except templates and
library items.
NO T E

Most of the Assets panel operations work the same in the Site list and in the Favorites
list. There are a few tasks, however, that you can perform only in the Favorites list (see
“Creating and managing a list of favorite assets” on page 168).

By default, assets in a given category are listed in alphabetical order by name. You can instead
list the assets by any of several other criteria or change the size of the columns. You can also
preview assets in a category, and change the size of the preview area.

Working with assets

161

To open the Assets panel:
■

Select Window > Assets.
The Assets panel appears. By default, the Images category is selected.

To view the Site list:
■

In the Assets panel (Window > Assets), select the Site option at the top of the panel.
NO T E

In the Templates and Library categories (on the left side of the Assets panel), the
Site and Favorites choices are unavailable.

To view the Favorites list:
■

In the Assets panel (Window > Assets), select the Favorites option at the top of the panel.
The Favorites list is empty until you explicitly add assets to it.
NO T E

In the Templates and Library categories (on the left side of the Assets panel), the
Site and Favorites choices are unavailable.

To display assets in a particular category:
■

Click the appropriate icon on the left side of the Assets panel (Window > Assets).

To list assets in a different order:
■

Click one of the column headings.
For example, to sort the list of images by type (so that all the GIF images are together, all
the JPEG images are together, and so on), click the Type column heading.

To change the width of a column:
■

162

Drag the line that separates two column headings.

Chapter 5: Managing Site Assets and Libraries

To preview an asset:
■

Select the asset in the Assets panel.
The preview area at the top of the panel shows a visual preview of the asset.
For example, when you select a movie asset, the preview area shows an icon. To view the
movie, click the Play button (the green triangle) in the upper-right corner of the preview
area.

To change the size of the preview area:
■

Drag the splitter bar (between the preview area and the list of assets) up or down.

Related topics
■
“Adding an asset to a document” on page 164
■

“Selecting and editing assets” on page 166

Refreshing the Assets panel
It can take a few seconds for the Assets panel to create the Site list because it needs to read the
site cache to create the list.
Certain changes don’t appear immediately in the Assets panel:
■

When you add or remove an asset from your site, the changes won’t appear in the Assets
panel until you refresh the Site list by clicking the Refresh Site List button. If you add or
remove an asset outside of Dreamweaver—using Windows Explorer or the Finder, for
example—you must rebuild the site cache to update the Assets panel.

■

When you remove the only instance of a particular color or URL in your site, or when you
save a new file that contains a color or URL that isn’t already used in the site, the changes
won’t appear in the Assets panel until you refresh the Site list.

To manually refresh the Site list:
1.

In the Assets panel (Window > Assets), select the Site option at the top of the panel to see
the Site list.

2.

Click the Refresh Site List button at the bottom of the Assets panel.
Dreamweaver creates the site cache or updates it as necessary, and the Assets panel updates
to show the site assets.

To manually rebuild the site cache and refresh the Site list:
■

In the Assets panel (Window > Assets), right-click (Windows) or Command-click
(Macintosh) in the Assets list, then select Refresh Site List.

Working with assets

163

Related topics
■
“Selecting and editing assets” on page 166
■

“Reusing assets in another site” on page 167

Adding an asset to a document
You can insert most kinds of assets into a document by dragging them into the Code view or
Design view in the Document window, or by using the Insert button. You can either insert
colors and URLs or apply them to selected text in the Design view. (URLs can also be applied
to other elements in the Design view, such as images.)
To insert an asset in a document:
1.

Place the insertion point in the Design view where you want the asset to appear.

2.

In the Assets panel (Window > Assets), select the category on the left side of the panel for
the type of asset you want to insert.
NO TE

3.

Select any category except Templates. A template can be applied only to an entire
document; it can’t be inserted into a document. For more information about
templates, see Chapter 11, “Managing Templates,” on page 295.

Select either Site or Favorites at the top of the panel, then select the asset you want to insert.
There are no Site or Favorites lists for library items; skip this step if you’re inserting a
library item.

4.

Do one of the following:
■

Drag the asset from the panel to the document.
You can drag scripts into the head content area of the Document window; if that area
isn’t showing, select View > Head Content.

■

Select the asset in the panel, then click Insert at the bottom of the panel.

The asset is inserted in the document. (If the asset is a color, it applies starting at the
insertion point; that is, subsequent typing appears in that color.)
Related topics
■
“Applying a URL to an image or text using the Assets panel” on page 165
■

“Selecting and editing assets” on page 166

■

“Reusing assets in another site” on page 167

164

Chapter 5: Managing Site Assets and Libraries

Applying a color to text using the Assets panel
The colors in the Assets panel represent colors you’ve applied to various elements in your site,
such as text, table border, background color, and so on. You can use the color swatches in the
Color category to consistently apply your color choices to objects on a page.
For information about adding a color to the Color category, see “Adding assets to and
removing assets from the Favorites list” on page 169.
To change the color of selected text in a document:
1.

Select the text in the document.

2.

In the Assets panel (Window > Assets), select the Colors category on the left side of the
panel.

3.

Select the desired color.

4.

Click the Apply button at the bottom of the panel.

Related topics
■
“Adding an asset to a document” on page 164
■

“Selecting and editing assets” on page 166

■

“Reusing assets in another site” on page 167

Applying a URL to an image or text using the Assets
panel
You can use the Assets panel to make the selected text or image an active link.
To add a link to the current selection in a document:
1.

Select the text or image where you want to apply the URL.

2.

In the Assets panel (Window > Assets), select the URLs category on the left side of the
panel.

3.

Select the desired URL.

4.

Do one of the following:
■

Drag the URL from the panel to the selection in the Design view.

■

Select the URL, then click the Insert button.

Working with assets

165

Related topics
■
“Adding an asset to a document” on page 164
■

“Applying a color to text using the Assets panel” on page 165

■

“Reusing assets in another site” on page 167

Selecting and editing assets
The Assets panel allows you to select multiple assets at once. It also provides a quick way to
begin editing assets.
To select multiple assets:
1.

In the Assets panel (Window > Assets), select one of the assets.

2.

Select the other assets in one of the following ways:
Shift-click to select a consecutive series of assets.

■

Control-click (Windows) or Command-click (Macintosh) to add an individual asset
to the selection (whether or not it’s adjacent to the existing selection). Control-click or
Command-click a selected asset to deselect it.

■

To edit an asset:
1.

In the Assets panel (Window > Assets), do one of the following:
■

Double-click the asset.

■

Select the asset, then click the Edit button at the bottom of the panel.

For some kinds of assets, such as images, editing the asset starts an external editing
application. For colors and URLs, editing the asset lets you change the asset’s value in the
Favorites list only. (You can’t edit colors and URLs in the Site list.) For templates and
library items, editing the asset allows you to make changes to the asset within
Dreamweaver.
NO T E

If an external editor doesn’t open for an asset that needs to use an editor, select Edit
> Preferences (Windows) or Dreamweaver > Preferences (Macintosh), select the File
Types/Editors category, and make sure you have an external editor defined for the
asset’s file type. (See “Starting an external editor for media files” on page 474.)

2.

Change the asset as desired.

3.

When you’re done editing the asset, do one of the following:
■

■

166

If the asset is a file-based asset (anything other than a color or URL), save it (using
whatever editor you used to edit it) and close it.
If the asset is a URL, click OK when you’re finished editing in the Edit URL dialog
box.
Chapter 5: Managing Site Assets and Libraries

If the asset is a color, the Dreamweaver color picker is dismissed automatically when
you pick a color.

■

N OT E

To dismiss the color picker without picking a color, press Escape.

Related topics
■
“Viewing assets in the Assets panel” on page 161
■

“Refreshing the Assets panel” on page 163

Reusing assets in another site
The Assets panel shows all the assets (of recognized types) in your current site. To use an asset
from the current site in another site, you must copy it to the other site. You can copy an
individual asset, a set of individual assets, or an entire Favorites folder at once.
You might need to locate the file in the Files panel that corresponds to an asset in the Assets
panel before you transfer the asset to or from your remote site.
NO TE

The Files panel might show a different site from the one that the Assets panel shows.
This is because the Assets panel is associated with the active document.

To locate an asset’s file in the Files panel:
1.

In the Assets panel (Window > Assets), select the category on the left side of the panel for
the type of asset you want to find.

2.

Right-click (Windows) or Control-click (Macintosh) the asset’s name or icon in the Assets
panel, then select Locate in Site from the context menu.
N OT E

Locate in Site is unavailable for colors and URLs, which do not correspond to files in
the site.

The Files panel opens, with the asset file selected. The Locate in Site command locates the
file corresponding to the asset itself; it does not locate a file that uses that asset.

Working with assets

167

To copy assets from the Asset panel’s Site list or Favorites list to another site:
1.

In the Assets panel (Window > Assets), select the category on the left side of the panel for
the type of asset you want to copy.

2.

Right-click (Windows) or Control-click (Macintosh) the asset or assets to copy, select
Copy to Site, then select the target site name from the submenu. (The submenu lists all the
sites you’ve defined.)
NO TE

In the Favorites list, you can copy a Favorites folder as well as individual assets. For
information about Favorites folders, see “Grouping assets in a Favorites folder”
on page 171.

The assets are copied to the specified site, into locations corresponding to their locations
in the current site. Dreamweaver creates new folders in the target site’s hierarchy as
needed. The assets are also added to the specified site’s Favorites list.
When you open a document in the target site, the Assets panel switches to that site, and shows
the copied asset.
N OT E

If the asset you copied is a color or a URL, it appears only in the other site’s Favorites list,
not in the other site’s Site list. This is because there is no file corresponding to the color
or URL, so there’s no file to copy into the other site.

Related topics
■
“Viewing assets in the Assets panel” on page 161
■

“Refreshing the Assets panel” on page 163

■

“Selecting and editing assets” on page 166

Creating and managing a list of favorite
assets
Because the Assets panel’s Site list always shows all of the recognized assets in the site, this list
can become cumbersome for some large sites. You can add frequently used assets to a Favorites
list, group related assets together, give them nicknames to remind you what they’re for, and
find them easily in the Assets panel.
NO T E

Favorite assets are not stored as separate files on your disk; they’re references to the
assets in the Site list. Dreamweaver keeps track of which assets from the Site list to
display in the Favorites list.

Most of the operations of the Assets panel are the same in the Favorites list as in the Site list.
However, there are several tasks that you can perform only in the Favorites list.

168

Chapter 5: Managing Site Assets and Libraries

Adding assets to and removing assets from the
Favorites list
There are several ways to add assets to your site’s Favorites list in the Assets panel.
Adding a color or URL to the Favorites list requires an extra step. Note that you can’t add new
colors or URLs to the Site list; the Site list contains only assets that are already in use in your
site.
NO TE

There are no Favorites lists for templates and library items.

To add assets to your Favorites list, do one of the following:
■

Select one or more assets in the Site list of the Assets panel, then click the Add to Favorites
button at the bottom of the panel.

■

Select one or more assets in the Site list of the Assets panel, right-click (Windows) or
Control-click (Macintosh), then select Add to Favorites.

■

Select one or more files in the Files panel, right-click (Windows) or Control-click
(Macintosh), then select Add to Favorites.
Dreamweaver ignores files that don’t fit a category in the Assets panel.

■

Right-click (Windows) or Control-click (Macintosh) an element in the Document
window’s Design view, then select the context menu command to add the element to the
appropriate Favorites category.
Note that the context menu for text contains either Add to Color Favorites or Add to
URL Favorites, depending on whether the text has a link attached. Also note that only
elements that fit one of the categories in the Assets panel can be added to the Favorites list.

To add a new color or URL to the Favorites list:
1.

In the Assets panel (Window > Assets), select the Colors or URLs category on the left side
of the panel.

2.

Select the Favorites option at the top of the panel to show the Favorites list.

3.

Click the New Color or New URL button at the bottom of the panel.

Creating and managing a list of favorite assets

169

4.

Do one of the following
■

Select a color using the color picker, then give the color a nickname if desired (see
“Creating a nickname for a favorite asset” on page 170).
To exit from the color picker without selecting a color, press Escape or click the gray
bar at the top of the color picker. For more information on using the color picker, see
“Working with colors” on page 350.

■

Enter a URL and a nickname in the Add New URL dialog box, then click OK.

To remove assets from your Favorites list:
1.

In the Assets panel (Window > Assets), select the Favorites option at the top of the panel.

2.

Select one or more assets (or a folder) in the Favorites list.

3.

Click the Remove From Favorites button at the bottom of the panel.
The assets are removed from the Favorites list, but they still appear in the Site list. If you
remove a Favorites folder, the folder and all of the assets in it are removed from the
Favorites list.

Related topics
■
“Viewing assets in the Assets panel” on page 161
■

“Creating a nickname for a favorite asset” on page 170

Creating a nickname for a favorite asset
You can give nicknames to assets in the Favorites list. The nickname is displayed instead of the
asset’s filename or value. For example, if you have a color named #999900, you might use a
more descriptive nickname, such as PageBackgroundColor or ImportantTextColor.
You can give nicknames to assets in the Favorites list in the Assets panel. In the Site list, the
assets are listed by their real filenames (or values, in the case of colors and URLs).
To give a nickname to a favorite asset:
1.

In the Assets panel (Window > Assets), select the category on the left side of the panel that
contains your asset.

2.

Select the Favorites option at the top of the panel to display the Favorites list.

170

Chapter 5: Managing Site Assets and Libraries

3.

Do one of the following:
■

■

4.

Right-click (Windows) or Control-click (Macintosh) the asset’s name or icon in the
Assets panel, then select Edit Nickname.
Click the asset’s name once, pause, then click it again.

Type a nickname for the asset, then press Enter (Windows) or Return (Macintosh).
The nickname appears in the Nickname column.

Related topics
■
“Viewing assets in the Assets panel” on page 161
■

“Adding assets to and removing assets from the Favorites list” on page 169

Grouping assets in a Favorites folder
You can group assets in your Favorites list in folders in the Assets panel. For example, if you
have a set of images that you use on numerous catalog pages in an e-commerce site, you could
group them together in a folder called CatalogImages.
N OT E

Placing an asset in a Favorites folder does not change the location of the asset’s file on
your disk.

To create a Favorites folder:
1.

In the Assets panel (Window > Assets) panel, select the Favorites option at the top of the
panel.

2.

Click the New Favorites Folder button at the bottom of the panel.

3.

Type a name for the folder, then press Enter (Windows) or Return (Macintosh).

4.

Drag assets into the folder.

Related topics
■
“Viewing assets in the Assets panel” on page 161
■

“Adding assets to and removing assets from the Favorites list” on page 169

■

“Creating a nickname for a favorite asset” on page 170

Creating and managing a list of favorite assets

171

Working with library items
Libraries are a way to store page elements such as images, text, and other objects that you want
to reuse or update frequently throughout your website. These elements are called library
items.
Related topics
■
“About library items” on page 159

Creating a library item
You can create a library item from any element in the body section of a document, including
text, tables, forms, Java applets, plug-ins, ActiveX elements, navigation bars, and images.
For linked items such as images, the library stores only a reference to the item. The original
file must remain at the specified location for the library item to work correctly.
It can still be useful to store an image in a library item, though; for example, you could store a
complete img tag in a library item, which would allow you to easily change the image’s alt
text, or even its src attribute, throughout the site. (Don’t use this technique to change an
image’s width and height attributes, though, unless you also use an image editor to change
the actual size of the image.)
To create a library item based on a selection:
1.

In the Document window, select a portion of a document to save as a library item.

2.

Do one of the following:
■
■

■

3.

Drag the selection into the Library category of the Assets pane (Window > Assets).
Click the New Library Item button at the bottom of the Library category of the Assets
panel (Window > Assets).
Select Modify > Library > Add Object to Library.

Type a name for the new library item, then press Enter (Windows) or Return (Macintosh).
Dreamweaver saves each library item as a separate file (with the file extension .lbi) in the
Library folder of the site’s local root folder.

To create an empty library item:
1.

Make sure nothing is selected in the Document window.
If something is selected, it will be placed in the new library item.

2.

172

In the Assets panel (Window > Assets), select the Library category on the left side of the
panel.

Chapter 5: Managing Site Assets and Libraries

3.

Click the New Library Item button at the bottom of the Assets panel.
A new, untitled library item is added to the list in the panel.

4.

While the item is still selected, enter a name for it, then press Enter (Windows) or
Return (Macintosh).

Related topics
■
“Editing a library item” on page 173
■

“Setting library highlighting preferences” on page 176

Inserting a library item in a document
When you add a library item to a page, the actual content is inserted in the document along
with a reference to the library item.
To insert a library item in a document:
1.

Place the insertion point in the Document window.

2.

In the Assets panel (Window > Assets), select the Library category on the left side of the
panel.

3.

Do one of the following:
■

Drag a library item from the Assets panel to the Document window.
TIP

■

To insert the contents of a library item without including a reference to the item in
the document, press Control (Windows) or Option (Macintosh) while dragging an
item out of the Assets panel. If you insert an item this way, you can edit the item in
the document, but the document won’t update when you update pages that use
that library item.

Select a library item, then click the Insert button at the bottom of the panel.

Related topics
■
“Creating a library item” on page 172
■

“Editing the properties for a library item” on page 177

■

“Making library items editable in a document” on page 177

Editing a library item
When you edit a library item, you can update all documents that use that item. If you choose
not to update, the documents remain associated with the library item; you can update them
later.

Working with library items

173

Other kinds of changes to library items include renaming items to break their connection
with documents or templates, deleting items from the site’s library, and recreating a missing
library item.
NO TE

The CSS Styles panel is unavailable when you are editing a library item, since library
items can contain only body elements and CSS style sheet code inserts in the head
section of a document. The Page Properties dialog box is also unavailable, because a
library item can’t include a body tag or its attributes.

To edit a library item:
1.

In the Assets panel (Window > Assets), select the Library category on the left side of the
panel.

2.

Select a library item.
A preview of the library item appears at the top of the Assets panel. (You can’t edit
anything in the preview.)

3.

Do one of the following:
■

Click the Edit button at the bottom of the panel.

■

Double-click the library item.

Dreamweaver opens a new window for editing the library item. This window is much like
a Document window, but its Design view has a gray background to indicate that you’re
editing a library item instead of a document.
4.

Edit the library item, then save your changes.

5.

In the dialog box that appears, select whether to update the documents on the local site that
uses the edited library item:
■
■

Select Update to update all documents in the local site with the edited library item.
Select Don’t Update to avoid changing any documents until you use Modify > Library
> Update Current Page or Update Pages.

To update the current document to use the current version of all library items:
■

Select Modify > Library > Update Current Page.

To update the entire site or all documents that use a particular library item:
1.

Select Modify > Library > Update Pages.
The Update Pages dialog box appears.

174

Chapter 5: Managing Site Assets and Libraries

2.

In the Look In pop-up menu, do one of the following:
■

Select Entire Site, then select the site name from the adjacent pop-up menu.
This updates all pages in the selected site to use the current version of all library items.

■

Select Files That Use, then select a library item name from the adjacent pop-up menu.
This updates all pages in the current site that use the selected library item.

3.

Make sure Library Items is selected in the Update option.
TIP

4.

To update templates at the same time, make sure Templates is also selected. For
more information, see “Opening a template for editing” on page 326.

Click Start.
Dreamweaver updates the files as indicated. If you selected the Show Log option,
Dreamweaver provides information about the files it attempts to update, including
information on whether they were updated successfully.

To rename a library item:
1.

In the Assets panel (Window > Assets), select the Library category on the left side of the
panel.

2.

Select the library item you want to rename, pause, then click again.

3.

When the name becomes editable, enter a new name.
N OT E

This method of renaming works the same way that renaming a file in Windows
Explorer (Windows) or the Finder (Macintosh) does. As with Windows Explorer and
the Finder, make sure to pause briefly between clicks. Do not double-click the name;
that opens the library item for editing.

4.

Click elsewhere, or press Enter (Windows) or Return (Macintosh).

5.

Dreamweaver asks if you want to update documents that use the item:
■

To update all documents in the site that use the item, click Update.

■

To refrain from updating any documents that use the item, click Don’t Update.

To delete a library item from a library:
1.

In the Assets panel (Window > Assets), select the Library category on the left side of the
panel.

2.

Select the library item you want to delete.

Working with library items

175

3.

Do one of the following:
Click the Delete button at the bottom of the panel, then confirm that you want to
delete the item.

■

Press the Delete key, then confirm that you want to delete the item.

■

CAUTION

Be careful; if you delete a library item, you can’t use Undo to retrieve it. You may be
able to recreate it, however, as described in the next procedure.

Dreamweaver removes the library item from the library, but doesn’t change the contents of
any documents that use the item.
To recreate a missing or deleted library item:
1.

Select an instance of the item in one of your documents.

2.

Click the Recreate button in the Property inspector (Window > Properties).

Related topics
“Creating a library item” on page 172

■
■

“Making library items editable in a document” on page 177

■

“Editing a behavior in a library item” on page 178

Setting library highlighting preferences
You can customize the highlight color for library items and show or hide highlighting of
library items by setting Highlighting preferences.
To change the highlight color for library items:
1.

Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
The Preferences dialog box appears.

2.

Select the Highlighting category from the list on the left.

3.

Click the Library Items color box, then select a highlight color using the color picker (or
enter the hexadecimal value for the highlight color in the text box).
For information about using the color picker, see “Working with colors” on page 350.

4.

Select Show to display the highlighted library color in the Document window.

5.

Click OK.

176

Chapter 5: Managing Site Assets and Libraries

To view highlight colors in the Document window:
■

Select View > Visual Aids > Invisible Elements.
Highlight colors appear in the document window only when View > Visual Aids >
Invisible Elements is enabled and the appropriate options are enabled in Highlighting
preferences.

Related topics
■
“Creating a library item” on page 172
■

“Editing a library item” on page 173

■

“Editing the properties for a library item” on page 177

Editing the properties for a library item
You can use the Property inspector for a library item to open a library item for editing, detach
a selected library item from its source file, or overwrite an item with the currently selected
library item.
To edit the properties for a library item:
1.

Select a library item in a document.

2.

Click one of the buttons in the Property inspector (Window > Properties), depending on
what you want to do.
For more information, click the Help icon in the Property inspector.

Related topics
■
“Creating a library item” on page 172
■

“Inserting a library item in a document” on page 173

■

“Setting library highlighting preferences” on page 176

Making library items editable in a document
If you’ve added a library item to your document and you want to edit the item specifically for
that page, you must break the link between the item in the document and the library. Once
you’ve made an instance of a library item editable, that instance cannot be updated when the
library item changes.

Working with library items

177

To make a library item editable:
1.

Select a library item in the current document.

2.

Click Detach from Original in the Property inspector (Window > Properties).
The selected instance of the library item loses its highlighting (if you had highlighting
visible), and can no longer be updated when the original library item changes.

Related topics
■
“Creating a library item” on page 172
■

“Inserting a library item in a document” on page 173

■

“Editing a library item” on page 173

■

“Editing the properties for a library item” on page 177

Editing a behavior in a library item
To edit a behavior in a library item, you must first insert the item in a document, then make
the item editable in that document. After you’ve made the desired changes, you can re-create
the library item, replacing the item in the library with the edited item from your document.
For more information about behaviors, see “Using JavaScript Behaviors” on page 493.
To edit a behavior in a library item:
1.

Open a document that contains the library item.
Note the name of the library item, as well as the exact tags it contains. You’ll need this
information later.

2.

Select the library item, and then click Detach from Original in the Property inspector
(Window > Properties).

3.

Select the element that has the behavior attached to it.

4.

In the Behaviors panel (Window > Behaviors), double-click the action you want to change.

5.

In the dialog box that appears, make the necessary changes, then click OK.

6.

In the Assets panel (Window > Assets), select the Library category on the left side of the
panel.

7.

Make sure you have recorded the exact name of the original library item; select the original
library item, then click the Delete button at the bottom of the panel.

8.

In the Document window, select all of the elements that make up the library item.
Be careful to select exactly the same elements that were in the original library item.

178

Chapter 5: Managing Site Assets and Libraries

9.

In the Assets panel, click the New Library Item button, then give the new item the same
name as the item you deleted.
Be sure to use exactly the same spelling and capitalization.

10. To

update the library item in your site’s other documents, select Modify > Library >
Update Pages.

11.

In the Update Pages dialog box, in the Look In pop-up menu, select Files That Use.

12. In
13.

the adjacent pop-up menu, select the name of the library item you just created.

In the Update option, make sure Library Items is selected, then click Start.

14. When

the updates are complete, click Close to exit the Update Pages dialog box.

Related topics
“Creating a library item” on page 172

■
■

“Inserting a library item in a document” on page 173

■

“Editing a library item” on page 173

Working with library items

179

180

Chapter 5: Managing Site Assets and Libraries

CHAPTER 6

6

Managing Contribute Sites
with Dreamweaver
Macromedia Contribute combines a web browser with a basic web-page editor. It enables
your colleagues or clients to browse to a page in a site that you created, and to edit or update
the page if they have permission to do so. Contribute users can add and update basic web
content, including formatted text, images, tables, and links. Contribute site administrators
can limit what ordinary (non-administrator) users can do in a site.
N OT E

This chapter assumes that you are a Contribute administrator.

As the site administrator, you give non-administrators the ability to edit pages by creating a
connection key and sending it to them. (For more information, see Using Contribute.) You can
also set up a connection to a Contribute site using Macromedia Dreamweaver 8, which lets
you or another user modify the files in the site just as you would in any other Dreamweaver
site. This can be useful for people who want to connect to your Contribute site, but want to
do so using Dreamweaver instead of Contribute. For example, your site designer would want
to be connected to your Contribute site, but would want all of the editing capabilities
available in Dreamweaver.
Contribute adds functionality to your website with Contribute Publishing Server (CPS), a
suite of publishing applications and user management tools that lets you integrate Contribute
with your organization’s user directory service—for example, Lightweight Directory Access
Protocol (LDAP) or Active Directory. When you enable your Dreamweaver site as a
Contribute site, Dreamweaver reads Contribute’s administration settings whenever you
connect to the remote site. If Dreamweaver detects that CPS is enabled, it communicates
directly with CPS. This allows Dreamweaver to inherit some of the functionality of CPS, such
as file rollback and event logging.
This chapter contains the following sections:
About managing Contribute sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Preparing a site for use with Contribute. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Administering a Contribute site using Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . 187

181

Managing Contribute files using Dreamweaver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Troubleshooting a Contribute site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

About managing Contribute sites
You can use Dreamweaver to connect to a Contribute site and modify the files in the site just
as you would in any Dreamweaver site. Most Dreamweaver capabilities work the same way
with a Contribute site as with any other site. There are only a few aspects of working with files
in a Contribute site that differ from working with files in other sites.

Site structure and page design for a Contribute site
To prepare your website to be edited by Contribute users, structure the site appropriately.
Create the folders that Contribute users should use for their pages, create index pages for
those folders, and add basic navigation to the pages. You might want to create user-specific
folders for users to practice in. You might also want to create CSS style sheets that define the
styles for each page or folder. You can do some of this setup work in Contribute, but it’s easier
to set up a site using Dreamweaver.
In addition, you can create templates that Contribute users can use to create new pages (see
“Creating templates for a Contribute site” on page 312).
The following suggestions may help you create a site that Contribute users can easily
contribute to:
■

Keep your site structure simple.
Don’t nest folders too deeply. Group related items together in a folder.

■

Set up appropriate read and write permissions for the folders on the server.
For more information, see “Enabling Contribute users to access templates without root
folder access” on page 190.

■

As you create your folder structure, add index pages to folders to encourage Contribute
users to place new pages in the correct folders.
For example, if Contribute users will be providing pages containing meeting minutes, you
can create a folder in the site root folder named meeting_minutes, and create an index
page in that folder. Then you can provide a link from your site’s main page to the index
page for meeting minutes. A Contribute user can then navigate to that index page and
create a new page of minutes for a specific meeting, linked from that page; the new page is
automatically created inside the meeting_minutes folder.

■

182

On each folder’s index page, provide a list of links to the individual content pages and
documents in that folder.
Chapter 6: Managing Contribute Sites with Dreamweaver

■

Keep page designs as simple as possible, minimizing fancy formatting.

■

Name your CSS styles clearly.
If the Contribute users working on your site use a standard set of styles in Microsoft
Word, name your CSS styles with the same names as the corresponding Word styles, so
that Contribute can map the styles when a user copies information from a Word
document and pastes it into a Contribute page.

■

To prevent a CSS style from being available to Contribute users, change the name of the
style so that the name starts with mmhide_.
For example, if you use a style named RightJustified in a page but you don’t want
Contribute users to be able to use that style, rename the style to mmhide_RightJustified.
NO T E

■

You have to add mmhide_ to the style name in Code view; you cannot add it in the
CSS panel.

Use CSS rather than HTML tags.
Contribute recognizes CSS styles and allows users to apply them.

■

Use as few CSS styles as possible, to keep things simple and clean.

■

If you use server-side includes for HTML page elements, such as headers or footers, create
an unlinked simple HTML page that contains links to the include files.
Contribute users can then bookmark that page and use it to navigate to the include files
and edit them.

Related topics
■
Chapter 2, “Setting Up a Dreamweaver Site,” on page 79
■

“Creating new documents” on page 92

■

“Using Cascading Style Sheets to format text” on page 394

■

“Working with server-side includes” on page 593

Site connection for Contribute compatibility
In Dreamweaver, you can connect to an existing Contribute site and modify files in the site
just as you would in any Dreamweaver site (“Setting up a new Dreamweaver site”
on page 82). When you connect to a site that’s been set up as a Contribute site (and that
already has an administrator), Dreamweaver prompts you to enable Contribute compatibility.
If you are preparing an existing Dreamweaver site for Contribute users, then you need to
explicitly enable Contribute compatibility to use Contribute-related features; Dreamweaver
will not prompt you. For more information, see “Preparing a site for use with Contribute”
on page 186.
About managing Contribute sites

183

Dreamweaver allows you to connect to a remote site, including a Contribute site, in a variety
of ways, but not all connection types support Contribute compatibility. In particular, the
following restrictions apply to connection types:
■

If you’re connecting to your remote site using WebDAV or Microsoft Visual SourceSafe,
you can’t enable Contribute compatibility, because those source-control systems aren’t
compatible with the Design Notes and Check In/Check Out systems that Dreamweaver
uses for Contribute sites.

■

If you use RDS to connect to your remote site, you can enable Contribute compatibility,
but you then must customize your connection before you can share it with Contribute
users.

■

If you’re using your local computer as a web server, you must set up the site using an FTP
or network connection to your computer (rather than just a local folder path) to be able to
share your connection with Contribute users.

File transfer to or from a Contribute site
Contribute uses a system much like the Dreamweaver Check In/Check Out system to ensure
that only one user at a time can edit a given web page. When you enable Contribute
compatibility in Dreamweaver, the Dreamweaver Check In/Check Out system is
automatically enabled.
To transfer files to and from a Contribute site using Dreamweaver, always use the Check In
and Check Out commands. If you instead use the Put and Get commands to transfer files,
you may overwrite the modifications that a Contribute user has recently made to a file.
N OT E

If you do use the Put command in a Contribute site, Dreamweaver automatically checks
the file in and then checks it out again, to reduce the chance that your changes will
conflict with another user’s.

Checking a file out from a Contribute site works just as it does in any other site.
When you check a file in to a Contribute site, Dreamweaver automatically makes a backup
copy of the previously checked in version of the file in the _baks folder and adds your user
name and a date stamp to a Design Notes file so others can see who checked in the file and
when. For more information about automatic backup copies, see “Enabling Contribute users
to access templates without root folder access” on page 190.
Related topics
■
“Checking in and checking out files” on page 134
■

184

“Preparing a site for use with Contribute” on page 186

Chapter 6: Managing Contribute Sites with Dreamweaver

Contribute file and folder permissions on the server
Contribute provides a way to manage file and folder permissions for each user role you define.
For more information, see Administering Contribute. Dreamweaver users are not affected by
these permissions, but Contribute enforces these permissions for Contribute users.
However, Contribute doesn’t provide a way to manage the underlying read and write
permissions assigned to files and folders by the server. You can manage those permissions
directly on the server.
You can think of Contribute user roles as an overlay on the server’s read and write permissions;
for example, if a user doesn’t have write permission to a folder on the server, then they can’t
save to that folder even if they’re a member of a role that’s allowed (according to Contribute
permissions) to write to that folder.
If a Contribute user doesn’t have read access on the server to a dependent file, such as an
image displayed in a page, the contents of the dependent file don’t appear in the Contribute
window. For example, if a user doesn’t have read access to an images folder, the images in that
folder appear as broken image icons in Contribute. Similarly, Dreamweaver templates are
stored in a subfolder of the site’s root folder, so if a Contribute user doesn’t have read access to
the root folder, they can’t use templates in that site unless you copy the templates to an
appropriate folder.
When you set up a site, you must give users read access on the server to the /_mm folder (the
_mm subfolder of the root folder), the /Templates folder, and all of the folders containing
assets that they will need to use.
If for some reason you can’t give users read access to the /Templates folder, see “Enabling
Contribute users to access templates without root folder access” on page 190 to supply users
with templates.

Contribute special files
Contribute uses a variety of special files that aren’t intended to be viewed by visitors to your
site. These files include the following:
■

The shared settings file, which has an obfuscated filename with a CSI extension, appears
in a folder named _mm in the root folder of the site, and contains information that
Contribute uses to manage the site

■

Older versions of files, in folders named _baks (see “Enabling Contribute users to access
templates without root folder access” on page 190)

About managing Contribute sites

185

■

Temporary versions of pages, so that users can preview changes

■

Temporary lock files, indicating that a given page is being edited or previewed

■

Design Notes files containing metadata about the site’s pages

In general, you shouldn’t edit any of these Contribute special files using Dreamweaver;
Dreamweaver manages them automatically.
If you don’t want these Contribute special files to appear on your publicly accessible server,
you can set up a staging server where Contribute users work on pages. Then you can
periodically copy those web pages from the staging server to a production server that’s on the
web. If you take this staging-server approach, copy only web pages to the production server,
not any of the above-listed Contribute special files. In particular, don’t copy the _mm and
_baks folders to the production server.
NO TE

For information about setting up a server to prevent visitors from seeing files in folders
that begin with an underscore, see “Website security” in Using Contribute.

In some circumstances, you might need to manually delete Contribute special files. For
example, there might be circumstances in which Contribute fails to delete temporary preview
pages when the user is finished previewing; in that case, you would have to manually delete
those temporary pages. Temporary preview pages have filenames that begin with TMP.
Similarly, under some circumstances an outdated lock file may be accidentally left on the
server. If that happens, you must manually delete the lock file to allow others to edit the page.
For information on how to delete the lock file, see “Unlocking a file in a Contribute site”
on page 191.

Preparing a site for use with Contribute
Before you can use Dreamweaver to administer a Contribute site, you must enable
Contribute compatibility. Depending on the site you are connecting to, you might be
automatically prompted to enable Contribute compatibility.
N O TE
186

When you enable Contribute compatibility, Dreamweaver automatically enables Design
Notes (including the Upload Design Notes for Sharing option) and the Check In/Check
Out system.

Chapter 6: Managing Contribute Sites with Dreamweaver

To enable Contribute compatibility for a defined Dreamweaver site:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Select a site, then click Edit.
The Site Definition dialog box appears.

3.

Click the Advanced tab.

4.

Select the Contribute category from the Category list on the left.

5.

Select the Enable Contribute Compatibility option and complete the dialog box.
For more information, click the Help button.

6.

Click OK to close the Site Definition dialog box.

7.

Click Done to close the Manage Sites dialog box.

Related topics
■
“Site connection for Contribute compatibility” on page 183

Administering a Contribute site using
Dreamweaver
After you enable Contribute compatibility (see “Preparing a site for use with Contribute”
on page 186), you can use Dreamweaver to start Contribute to perform site administration
tasks.
NO T E

You must have Contribute installed on the same machine as Dreamweaver.

As an administrator of a Contribute site, you can do any of the following:
■

Change the administrative settings for the site.
Contribute administrative settings are a collection of settings that apply to all users of your
website. These settings enable you to fine-tune Contribute to provide a better user
experience.

■

Change the permissions granted to user roles in Contribute.

Administering a Contribute site using Dreamweaver

187

■

Set up Contribute users.
Contribute users need certain information about the site to be able to connect to it. You
can package all of this information in a file called a connection key to send to Contribute
users.
NO T E

A connection key is not the same as a Dreamweaver exported site file. To export site
information for use with Dreamweaver, see“Importing and exporting sites”
on page 132.

TIP

Before you give Contribute users the connection information they need to edit
pages, you should use Dreamweaver to create the basic folder hierarchy for your site
(see “Site structure and page design for a Contribute site” on page 182), and to
create any templates and CSS style sheets needed for the site (see “Creating
templates for a Contribute site” on page 312).

To administer a Contribute website in Dreamweaver:
1.

Select Site > Manage Sites.
The Manage Sites dialog box appears.

2.

Select a site, then click Edit.
The Site Definition dialog box appears.

3.

Click the Advanced tab.

4.

Select the Contribute category from the category list on the left.

5.

Click the Administer Site in Contribute button.
N OT E

6.

This button does not appear if you have not enabled Contribute compatibility. For
information about how to enable this option, see “Preparing a site for use with
Contribute” on page 186.

If prompted, enter the administrator password, and then click OK.
The Administer Website dialog box appears.

7.

Do any of the following:
■

■

■

To change administrative settings, select a category from the list on the left, and then
change settings as necessary.
To change role settings, in the Users and Roles category, click the Edit Role Settings
button, and then make changes as necessary.
To send a connection key to set up users, in the Users and Roles category, click the
Send Connection Key button, and then complete the Connection Wizard.
T IP

188

For more information about administrative settings, managing user roles, or
creating a connection key, see Using Contribute.

Chapter 6: Managing Contribute Sites with Dreamweaver

8.

Click Close to close the Administer Website dialog box.

9.

Click OK to close the Site Definition dialog box.

10. Click

Done to close the Edit Sites dialog box.

Related topics
■
“Managing Contribute files using Dreamweaver” on page 189

Managing Contribute files using
Dreamweaver
Most Dreamweaver capabilities work the same way with a Contribute site as they do with any
other site. However, when you use Dreamweaver with a Contribute site, Dreamweaver
automatically performs certain file-management operations, such as saving multiple revisions
of a document, and logging certain events in the CPS Console.
This section describes the aspects of working with files in a Contribute site that differ from
working with files in other sites.
For information about transferring files to and from a Contribute site, see “File transfer to or
from a Contribute site” on page 184. For information about Contribute special files, see
“Contribute special files” on page 185.
N OT E

A Contribute administrator may assign users to roles, and may specify what actions
members of each role can perform. When you use Dreamweaver to manage files in a
Contribute site, role-based restrictions don’t apply to you; the only restrictions that apply
are read and write permissions on the server. For more information about the different
kinds of permissions, see “Contribute file and folder permissions on the server”
on page 185.

Deleting, moving, or renaming a remote file in a
Contribute site
Deleting a file from the remote server that hosts a Contribute site works much like deleting a
file from the server for any Dreamweaver site. However, when you delete a file from a
Contribute site, Dreamweaver asks whether to delete all older versions of the file. If you
choose to keep the older versions, Dreamweaver saves a copy of the current version as well so
you can restore it later.

Managing Contribute files using Dreamweaver

189

Renaming a remote file or moving it from one folder to another in a Contribute site works the
same way it works in any Dreamweaver site. In a Contribute site, Dreamweaver also renames
or moves the associated previous versions of the file that are saved in the _baks folder.
To delete a remote file:
1.

Select the file in the Remote pane of the Files panel (Window > Files), and then press
Backspace (Windows) or Delete (Macintosh).
A dialog box appears asking you to confirm that you want to delete the file.

2.

If the Delete Rollback Versions option appears in the confirmation dialog box, do one of
the following:
■

■

3.

To delete all previous versions of the file as well as the current version, select the Delete
Rollback Versions option.
To leave previous versions on the server, deselect the Delete Rollback Versions option.

Click Yes to delete the file.
The file is deleted. If you chose to delete previous versions, they are deleted as well. If you
chose not to delete previous versions, a copy of the current version is saved in the _baks
folder as a new revision of the file.

Related topics
■
“Enabling Contribute users to access templates without root folder access” on page 190
■

“Unlocking a file in a Contribute site” on page 191

Enabling Contribute users to access templates
without root folder access
In a Contribute site, you manage underlying file and folder permissions directly on the server.
For more information, see “Contribute file and folder permissions on the server” on page 185.
When you set up a site, you must give users read access on the server to the /_mm folder (the
_mm subfolder of the root folder), the /Templates folder, and all of the folders containing
assets that they will need to use. It’s also a good idea to give users read access on the server to
the /Templates folder.
If for some reason you can’t give users read access to the /Templates folder, you can still make
the templates available to users.

190

Chapter 6: Managing Contribute Sites with Dreamweaver

To allow Contribute users to use templates without read access to the main
site’s root folder:
1.

Set up the Contribute site so that its root folder is the folder you want users to see as the
root.

2.

Manually copy the template folder from the main site’s root folder into the Contribute
site’s root folder, using the Files panel.

3.

After you update templates for the main site, recopy the changed templates into
appropriate subfolders as needed.

If you take this approach, don’t use site root-relative links in the subfolders. Site root-relative
links are relative to the main root folder on the server, not to the root folder you define in
Dreamweaver. Contribute users can’t create site root-relative links. For more information
about site root-relative links, see “Understanding document locations and paths”
on page 422.
If links in a Contribute page appear to be broken, it’s possible that there’s a problem with
folder permissions, particularly if the links link to pages outside of the Contribute user’s root
folder. Check read and write permissions for folders on the server.

Unlocking a file in a Contribute site
Sometimes a remote file in a Contribute site appears to be checked out, but the file isn’t
actually locked on the user’s computer. When this happens, unlock the file to enable users to
edit it.
N OT E

Before following this procedure, make sure that the file really isn’t checked out. If you
unlock a file while a Contribute user is editing it, multiple users might edit the file
simultaneously.

To unlock a checked-out file:
1.

Do one of the following:
■
■

Open the file in the Document window, and then select Site > Undo Check Out.
In the Files panel (Window > Files), right-click (Windows) or Control-click
(Macintosh), and then select Undo Check Out.

A dialog box might appear, indicating who has the file checked out and asking you to
confirm that you want to unlock the file.
2.

If the dialog box appears, click Yes to confirm.
The file is unlocked on the server.

Managing Contribute files using Dreamweaver

191

Logging events
If Contribute Publishing Server (CPS) is enabled on the remote site you are connecting to,
Dreamweaver notifies the CPS every time you trigger a network operation such as checking
in, rolling back, or publishing a file. The CPS will log these events, and you can view the log
in the CPS Administration Console.
N OT E

CPS is enabled using Contribute. For more information, see Administering Contribute.

To start logging events:
■

Enable the Contribute compatibility features in Dreamweaver.
For more information, see “Preparing a site for use with Contribute” on page 186.

To view the event log:
■

Switch to the CPS Administration Console.
For more information, see Administering Contribute.

To stop logging events:
■

Disable the Contribute compatibility features.

Troubleshooting a Contribute site
If you encounter a problem with a Contribute site, see the following specific topics for
information on how to resolve the problem:
■

For problems connecting to a Contribute site, see “Troubleshooting connection problems
for a Contribute site” on page 192.

■

For problems using the administration tools, see “Troubleshooting the Contribute
administration tools” on page 193.

For more troubleshooting information, see the troubleshooting section in Administering
Contribute.

Troubleshooting connection problems for a
Contribute site
When you click any button related to Contribute site administration, Dreamweaver verifies
that it can connect to your remote site and that the Site Root URL you’ve given for the site is
valid. If Dreamweaver can’t connect, or if the URL isn’t valid, an error message appears.

192

Chapter 6: Managing Contribute Sites with Dreamweaver

To check a Contribute connection:
1.

Check the Site Root URL in the Contribute category of the Site Definition dialog box by
opening that URL in a browser, to make sure that the correct page opens.

2.

Use the Test button in the Remote Info category of the Site Definition dialog box to make
sure that you can connect to the site.

3.

If the URL is correct but the Test button results in an error message, ask your system
administrator for help.

Troubleshooting the Contribute administration tools
If the administration tools aren’t working properly, there might be something wrong with
the _mm folder.
To check the _mm folder:
1.

On the server, make sure that you have read and write permission, and executable
permissions if necessary, for the _mm folder.

2.

Make sure that the _mm folder contains a shared settings file with a CSI extension.

3.

If it doesn’t, use the Connection Wizard (Windows) or Connection Assistant (Macintosh)
to create a connection to the site and to become an administrator for the site.
The shared settings file is created automatically when you become an administrator. For
more information about becoming an administrator for an existing Contribute website,
see Administering Contribute.

Related topics
■
“Troubleshooting connection problems for a Contribute site” on page 192

Troubleshooting a Contribute site

193

194

Chapter 6: Managing Contribute Sites with Dreamweaver

3

PART 3

Laying Out Pages
Use the visual design tools in Macromedia Dreamweaver 8 to create
sophisticated page layouts.
This part contains the following chapters:
Chapter 7: Laying Out Pages with CSS . . . . . . . . . . . . . . . . . . . . . 197
Chapter 8: Presenting Content with Tables . . . . . . . . . . . . . . . . . 233
Chapter 9: Laying Out Pages in Layout Mode. . . . . . . . . . . . . . . 257
Chapter 10: Using Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Chapter 11: Managing Templates . . . . . . . . . . . . . . . . . . . . . . . . . . 295

195

7

CHAPTER 7

Laying Out Pages with CSS
In Macromedia Dreamweaver 8, you can use CSS styles to lay out your page. You can either
insert div tags manually and apply CSS positioning styles to them, or you can use
Dreamweaver layers to create your layout. A layer in Dreamweaver is an HTML page
element—specifically, a div tag, or any other tag—that has an absolute position assigned to it.
N O TE

Dreamweaver treats all div tags with an absolute position as layers, even if you didn’t
create those div tags using the Layer drawing tool.

TIP

You can use a Dreamweaver design file as a starting point for your CSS layout. Select a
file from the Page Designs (CSS) category of the New Document dialog box (see
“Creating a document based on a Dreamweaver design file” on page 93).

Whether you use CSS, tables, or frames to lay out your pages, Dreamweaver has rulers and
grids for visual guidance in your layout. Dreamweaver also has a tracing image feature, which
you can use to re-create a page design that was created in a graphics application.
NO TE

If you’re unfamiliar with using layers and Cascading Style Sheets (CSS), but are familiar
with using tables, try using tables or Layout mode for page layout (see “Presenting
Content with Tables” on page 233 and “Laying Out Pages in Layout Mode”
on page 257).

This chapter contains the following sections:
About layers in Dreamweaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Inserting a layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Setting layer preferences and properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Managing layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Manipulating layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Converting layers to tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Animating layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Inserting div tags for layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Working with div tags for layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222

197

Changing the highlight color for div tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
Working with CSS layout visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
Using rulers, guides, and the grid to lay out pages . . . . . . . . . . . . . . . . . . . . . . . . . . .226
Using a tracing image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

About layers in Dreamweaver
A layer is an HTML page element—specifically, a div tag, or any other tag—that has an
absolute position assigned to it. Layers can contain text, images, or any other content that you
can place in the body of an HTML document.
NO TE

Layers, as described in this chapter, refer to the Dreamweaver layout concept, not the
layer tag.

Understanding layers
With Dreamweaver, you can use layers to lay out your page. You can place layers in front of
and behind each other, hide some layers while showing others, and move layers across the
screen. You can place a background image in one layer, then place a second layer, containing
text with a transparent background, in front of that.
Layers provide a great deal of flexibility in placing content. However, site visitors with very old
web browsers might have trouble viewing layers. To ensure that everyone can view your web
page, you can design your page layout using layers, and then convert the layers to tables. For
more information, see “Converting layers to tables” on page 210. If your audience is likely to
be using any recent browser, however, you can design layouts entirely with layers, without
converting them to tables.
Related topics
■
“Managing layers” on page 204

198

Chapter 7: Laying Out Pages with CSS

HTML code for layers
When you place a layer in a document, Dreamweaver inserts the HTML tag for that layer in
your code. By default, Dreamweaver creates layers using the div tag.
NO T E

There are two other tags that you can use to create layers: layer and ilayer. However,
these tags are supported only in Netscape Navigator 4; Internet Explorer does not
support these tags, and Netscape discontinued support for these tags in later browsers.
Dreamweaver recognizes the layer and ilayer tags, but does not create layers using
these tags.

When you draw a layer using the Draw Layer tool, Dreamweaver inserts a div tag in the
document and assigns the layer an id value (by default Layer1 for the first layer you draw,
Layer2 for the second layer you draw, and so on). Later, you can rename the layer to anything
you want using the Layers panel or the Property inspector. Dreamweaver also uses embedded
CSS in the head of the document to position the layer, and to determine the layer’s exact
dimensions.
The following is sample HTML code for a layer:


Sample Layers Page



You can set properties for layers on your page, including x and y coordinates, z-index (also called the stacking order), and visibility. For more information, see “Setting layer preferences and properties” on page 202. About layers in Dreamweaver 199 Related topics ■ “Understanding layers” on page 198 Inserting a layer Dreamweaver lets you create layers on your page easily and position them precisely. You can also create nested layers. For more information, see “Nesting layers” on page 201. NO T E You can use a Dreamweaver design file as a starting point for your CSS layout. Select a file from the Page Designs (CSS) category of the New Document dialog box (see “Creating a document based on a Dreamweaver design file” on page 93). When you insert a layer, Dreamweaver displays the layer’s border, by default, and highlights the block when you move the pointer over it. You can enable layer borders by disabling both Layer Outlines and CSS Layout Outlines in the View > Visual Aids menu. You can also enable backgrounds and the box model for layers as a visual aid while you design. For more information, see “Working with CSS layout visualization” on page 224. To change the highlight color of a layer or to disable highlighting, see “Changing the highlight color for div tags” on page 223. After you create a layer, you can add content to it by simply placing your insertion point in the layer, and then adding content just as you would add content to a page. To draw a single layer or multiple layers consecutively: 1. In the Layout category of the Insert bar, click the Draw Layer button. 2. In the Document window’s Design view, do one of the following: Drag to draw a single layer. ■ Control-drag (Windows) or Command-drag (Macintosh) to draw multiple layers consecutively. ■ You can continue to draw new layers as long as you do not release the Control or Command key. To insert a layer at a particular place in the document: ■ Place the insertion point in the Document window, and then select Insert > Layout Objects > Layer. NO T E 200 This procedure places the tag for the layer wherever you clicked in the Document window. The visual rendering of the layer may thus affect other page elements (like text) that surround it. Chapter 7: Laying Out Pages with CSS To place the insertion point in a layer: ■ Click anywhere inside the layer’s borders. The layer’s borders highlight, and the selection handle appears, but the layer itself is not selected. For information on selecting layers, see “Selecting layers” on page 205. To show layer borders: ■ Select View > Visual Aids and select either Layer Outlines or CSS Layout Outlines. NO T E Selecting both options simultaneously will have the same effect. To hide layer borders: ■ Select View > Visual Aids and deselect both Layer Outlines and CSS Layout Outlines. Related topics ■ “Setting layer preferences and properties” on page 202 ■ “Managing layers” on page 204 ■ “Manipulating layers” on page 208 Nesting layers A nested layer is a layer whose code is contained in another layer. Nesting is often used to group layers together. A nested layer moves with its parent layer and can be set to inherit visibility from its parent. You can enable the Nesting option to automatically nest when you draw a layer starting inside another layer. Inserting a layer 201 To draw a nested layer: 1. In the Layout category of the Insert bar, click the Draw Layer button. 2. In the Document window’s Design view, drag to draw a layer inside an existing layer: If Nesting is turned off in Layers preferences, Alt-drag (Windows) or Option-drag (Macintosh) to nest a layer inside an existing layer. TIP Nested layers may appear differently in different browsers. When you create nested layers, check their appearance in various browsers frequently during the design process. To insert a nested layer: ■ Place the insertion point inside an existing layer in the Document window’s Design view, then select Insert > Layer. To nest an existing layer inside another layer using the Layers panel: 1. Select Window > Layers to open the Layers panel. 2. Select a layer in the Layers panel, then Control-drag (Windows) or Command-drag (Macintosh) the layer to the target layer in the Layers panel. 3. Release the mouse button when the name of the target layer is highlighted. To nest layers automatically when you draw a layer starting inside another layer: ■ Select the Nesting option in the Layer preferences. For more information, see “Setting layer preferences” on page 203. Related topics ■ “Inserting a layer” on page 200 ■ “Managing layers” on page 204 ■ “Manipulating layers” on page 208 Setting layer preferences and properties You can specify default settings for your layers. You can also view and set various attributes of one or more layers using the Property inspector. 202 Chapter 7: Laying Out Pages with CSS Setting layer preferences Use the Layers category in the Preferences dialog box to specify the default settings for new layers you create. To view or set layer preferences: 1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh). The Preferences dialog box appears. 2. Select Layers from the Category list on the left. 3. Make changes as necessary. For more information, click the Help button in the dialog box. 4. Click OK. Related topics ■ “Viewing and setting properties for multiple layers” on page 204 Viewing and setting properties for a single layer When you select a layer, the Property inspector displays layer properties. To view and set layer properties: 1. Select a layer (see “Selecting layers” on page 205). 2. In the Property inspector (Window > Properties), click the expander arrow in the lowerright corner, if it isn’t already expanded, to see all properties. 3. Change the layer’s attributes by setting properties as necessary. For more information, click the Help button in the Property inspector. Related topics ■ “Setting layer preferences” on page 203 ■ “Managing layers” on page 204 Setting layer preferences and properties 203 Viewing and setting properties for multiple layers When you select two or more layers, the layer Property inspector displays text properties and a subset of the full layer properties, allowing you to modify several layers at once. To select multiple layers: ■ Hold down Shift while selecting layers (see “Selecting layers” on page 205). To view and set properties for multiple layers: 1. Select multiple layers. 2. In the Property inspector (Window > Properties), click the expander arrow in the lowerright corner, if it isn’t already expanded, to see all properties. 3. Change the layers’ attributes by setting properties. For more information, click the Help button in the Property inspector. Related topics ■ “Setting layer preferences” on page 203 ■ “Viewing and setting properties for a single layer” on page 203 Managing layers You can select layers to work with them. You can also change the stacking order and visibility of layers. The Layers panel provides a convenient way to manage layers. Using the Layers panel The Layers panel is a way to manage the layers in your document. Use the Layers panel to prevent overlaps, to change the visibility of layers, to nest or stack layers, and to select one or more layers. To open the Layers panel: ■ Select Window > Layers. 204 Chapter 7: Laying Out Pages with CSS Layers are displayed as a list of names, in order of z-index; by default, the first created layer (with a z-index of 1) appears at the bottom of the list, and the most recently created layer (with a z-index greater than 1) appears at the top of the list. You can change the z-index of a layer, however, to change its place in the stacking order. For example, if you created eight layers and wanted to make the fourth layer the “top” layer in the stacking order, you could assign it a higher z-index than all of the other layers. For more information on using the Layers panel, see the following topics: ■ “Inserting a layer” on page 200 ■ “Selecting layers” on page 205 ■ “Changing the stacking order of layers” on page 206 ■ “Changing layer visibility” on page 207 ■ “Preventing layer overlaps” on page 211 Selecting layers You can select one or more layers to manipulate them or change their properties. To select a layer in the Layers panel: ■ In the Layers panel (Window > Layers), click the name of the layer. To select a layer in the Document window, do one of the following: ■ Click a layer’s selection handle. If the selection handle isn’t visible, click anywhere inside the layer to make the handle visible. ■ Click a layer’s border. ■ Control-Shift-click (Windows) or Command-Shift-click (Macintosh) inside a layer. ■ Click inside a layer and press Control+A (Windows) or Command+A (Macintosh) to select the contents of the layer. Press Control+A or Command+A again to select the layer. ■ Click inside a layer and select its tag in the tag selector. Managing layers 205 To select multiple layers, do one of the following: ■ In the Layers panel (Window > Layers), Shift-click two or more layer names. ■ In the Document window, Shift-click inside or on the border of two or more layers. Related topics ■ “Inserting a layer” on page 200 ■ “Setting layer preferences and properties” on page 202 ■ “Managing layers” on page 204 ■ “Manipulating layers” on page 208 Changing the stacking order of layers Use the Property inspector or the Layers panel to change the stacking order of layers. The layer at the top of the Layers panel list is at the top of the stacking order, and appears in front of the other layers. In HTML code, the stacking order, or z-index, of the layers determines the order in which they are drawn in a browser. The higher the z-index of a layer, the higher that layer is in the stacking order. You can change the z-index for each layer using the Layers panel or Property inspector. To change the stacking order of layers in the Layers panel: 1. Select Window > Layers to open the Layers panel. 2. Drag a layer up or down to the desired stacking order. A line appears as you move the layer, indicating where the layer will appear. Release the mouse button when the placement line appears in the desired place in the stacking order. To change the stacking order of layers using the Property inspector: 1. Select Window > Layers to open the Layers panel to see the current stacking order. 2. Select a layer in the Layers panel or in the Document window. 3. In the layer Property inspector (Window > Properties), type a number in the Z-Index text box. ■ Type a higher number to move the layer up in the stacking order. ■ Type a lower number to move the layer down in the stacking order. Related topics ■ “Using the Layers panel” on page 204 ■ “Selecting layers” on page 205 206 Chapter 7: Laying Out Pages with CSS Changing layer visibility While working on your document, you can show and hide layers manually, using the Layers panel, to see how the page will appear under different conditions. NO T E The currently selected layer always becomes visible and appears in front of other layers while it’s selected. To change layer visibility: 1. Select Window > Layers to open the Layers panel. 2. Click in the eye icon column for a layer to change its visibility. ■ An open eye means the layer is visible. ■ A closed eye means the layer is invisible. ■ If there is no eye icon, usually the layer inherits visibility from its parent. (When layers are not nested, the parent is the document body, which is always visible.) Also, no eye icon appears when no visibility is specified (which appears in the Property inspector as Default visibility). To change the visibility of all layers at once: ■ In the Layers panel (Window > Layers), click the header eye icon at the top of the column. N OT E This procedure can set all layers to visible or hidden, but not to inherit. Related topics ■ “Using the Layers panel” on page 204 ■ “Changing the stacking order of layers” on page 206 Managing layers 207 Manipulating layers As you work with your page layout, you can select, move, resize, and align layers. You must select a layer before you can move, resize, or align it. To prevent layers from overlapping each other as you move and resize them, use the Prevent Overlap option (see “Preventing layer overlaps” on page 211). Resizing layers You can resize an individual layer, or simultaneously resize multiple layers to make them the same width and height. If the Prevent Overlaps option is on, you will not be able to resize a layer so that it overlaps with another layer (see “Preventing layer overlaps” on page 211). To resize a layer: 1. In the Design view, select a layer (see “Selecting layers” on page 205). 2. Do one of the following to resize the layer: ■ ■ To resize by dragging, drag any of the layer’s resize handles. To resize one pixel at a time, hold down Control (Windows) or Option (Macintosh) while pressing an arrow key. The arrow keys move the right and bottom borders of the layer; you can’t resize using the top and left borders with this technique. ■ To resize by the grid snapping increment, hold down Shift-Control (Windows) or Shift-Option (Macintosh) while pressing an arrow key. For information about setting the grid snapping increment, see “Using a tracing image” on page 230. ■ In the Property inspector (Window > Properties), type values for width (W) and height (H). Resizing a layer changes the width and height of the layer. It does not define how much of the layer’s content is visible. To define the visible region within a layer, see “Setting layer preferences and properties” on page 202. 208 Chapter 7: Laying Out Pages with CSS To resize multiple layers at once: 1. In the Design view, select two or more layers (see “Selecting layers” on page 205). 2. Do one of the following: ■ Select Modify > Align > Make Same Width or Modify > Align > Make Same Height. The first selected layers conform to the width or height of the last selected layer. ■ In the Property inspector (Window > Properties), under Multiple Layers, enter width and height values. The values are applied to all selected layers. Related topics ■ “Aligning layers” on page 210 ■ “Using a tracing image” on page 230 Moving layers You can move layers in the Design view in much the same way that you move objects in most basic graphics applications. If the Prevent Overlaps option is on, you will not be able to move a layer so that it overlaps another layer. (See “Preventing layer overlaps” on page 211.) To move one or more selected layers: 1. In the Design view, select a layer or multiple layers (see “Selecting layers” on page 205). 2. Do one of the following: ■ ■ To move by dragging, drag the selection handle of the last selected layer (highlighted in black). To move one pixel at a time, use the arrow keys. Hold down the Shift key while pressing an arrow key to move the layer by the current grid snapping increment. For information about setting the grid snapping increment, see “Using a tracing image” on page 230. Related topics “Resizing layers” on page 208 ■ ■ “Using a tracing image” on page 230 Manipulating layers 209 Aligning layers Use the layer alignment commands to align one or more layers with a border of the last layer selected. When you align layers, child layers that aren’t selected may move because their parent layer is selected and moved. To prevent this, don’t use nested layers. To align two or more layers: 1. In the Design view, select the layer (see “Selecting layers” on page 205). 2. Select Modify > Arrange, and then select an alignment option. For example, if you select Top, all of the layers move so that their top borders are in the same vertical position as the top border of the last selected layer (highlighted in black). Related topics ■ “Resizing layers” on page 208 ■ “Moving layers” on page 209 ■ “Using a tracing image” on page 230 Converting layers to tables Instead of using tables or Layout mode to create your layout, some web designers prefer to work with layers. Dreamweaver enables you to create your layout using layers, then (if you want) convert them into tables. For example, you might need to convert your layers to tables if you need to support browsers before version 4.0. N OT E You can’t convert layers to tables or tables to layers in a template document or in a document to which a template has been applied. Instead, create your layout in a nontemplate document and convert it before saving it as a template. You can convert back and forth between layers and tables to adjust the layout and optimize page design. You cannot convert a specific table or layer on a page; you must convert layers to tables and tables to layers for an entire page. NO T E 210 Converting from layers to tables may result in tables with a large number of empty cells. Chapter 7: Laying Out Pages with CSS Preventing layer overlaps Because table cells cannot overlap, Dreamweaver cannot create a table from overlapping layers. If you plan to convert the layers in a document to tables, use the Prevent Overlap option to constrain layer movement and positioning so that layers don’t overlap. When this option is on, a layer can’t be created in front of, moved or resized over, or nested within an existing layer. If you activate this option after creating overlapping layers, drag each overlapping layer to move it away from other layers. Dreamweaver does not automatically fix existing overlapping layers in the page when you enable Prevent Layer Overlaps. When this option and snapping are enabled, a layer won’t snap to the grid if it would cause two layers to overlap. Instead, it will snap to the edge of the closest layer. NO TE This is a new Note table. It is attached to a ta Table_anchor paragraph tag. To create one, copy and paste from the reference page. N O T E C e r t a i n a c t i o n s a l l o w y o u t o o v e r l a p la ye rs ev en wh en th e P r eve n t Ove r l a p s o p t i o n i s e na bl ed . I f yo u i n se r t a la ye r u si n g t h e I n se r t me n u , e n t e r n u mbe r s i n t he P r o p e r t y i n s p e c t o r , o r r e p o s i t i o n l a y er s b y e d it in g t he HT M L so u r c e c o d e, y o u ca n ca u s e l a y er s t o o v e r l a p o r n e s t w h i le t h i s o p t i o n i s e n a b l ed . I f o v e r l a p s ha p p en , d r a g o v e r l a p p i n g l a y e r s in t h e D e s i g n v i e w t o s ep a r a t e t h e m. To prevent layers from overlapping, do one of the following: ■ In the Layers panel (Window > Layers), select the Prevent Overlaps option. ■ In the Document window, select Modify > Arrange > Prevent Layer Overlaps. Converting between layers and tables You can create your layout using layers, then convert the layers to tables so that your layout can be viewed in older browsers. Before you convert to tables, make sure layers do not overlap (see “Preventing layer overlaps” on page 211). To convert layers to a table: 1. Select Modify > Convert > Layers to Table. The Convert Layers to Tables dialog box appears. 2. Select the desired options. For more information, click the Help button in the dialog box. 3. Click OK. The layers are converted to a table. Converting layers to tables 211 To convert tables to layers: 1. Select Modify > Convert > Tables to Layers. The Convert Tables to Layers dialog box appears. 2. Select the desired options. For more information, click the Help button in the dialog box. 3. Click OK. The tables are converted to layers. Empty cells are not converted to layers unless they have background colors. NO T E Page elements that were outside of tables are also placed in layers. Animating layers Dynamic HTML, or DHTML, refers to the combination of HTML with a scripting language that allows you to change the style or positioning properties of HTML elements. Timelines in Dreamweaver use dynamic HTML to change the properties of layers and images over time. Use timelines to create animations that do not require any ActiveX controls, plugins, or Java applets (but do require JavaScript). N OT E The word dynamic can mean different things in different web-related contexts. Don’t confuse Dynamic HTML with the idea of a dynamic web page, which means a web page generated dynamically by server-side code before being served to a visitor. Timelines allow you to change the position, size, visibility, and stacking order of a layer. (The layer functions of timelines work only in 4.0 or later browsers.) Timelines are also useful for other actions that you want to occur after a page loads. For example, timelines can change the source file of an image tag so different images appear in the page over time. To see the JavaScript code generated by a timeline, open the Document window’s Code view. The timeline code is in the MM_initTimelines function, inside a script tag in the head section of the document. When editing the HTML of a document containing timelines, make sure you do not move, rename, or delete anything that a timeline refers to. 212 Chapter 7: Laying Out Pages with CSS Using the Timelines panel The Timelines panel shows how the properties of layers and images change over time. Select Window > Timelines to open the Timelines panel. Timeline pop-up menu Playback head Frame numbers Behaviors channel Keyframes Animation channel Animation bar Timeline pop-up menu specifies which of the document’s timelines is currently displayed in the Timelines panel. Playback head shows which frame of the timeline is currently displayed in the Document window. Frame numbers indicate the sequential numbering of frames. The number between the Back and Play buttons is the current frame number. You control the duration of animation by setting the total number of frames and the number of frames per second (fps). The default setting of 15 frames per second is a good average rate to use for most browsers running on common Windows and Macintosh systems. N OT E Faster rates may not improve performance. Browsers always play every frame of the animation, even if they cannot attain the specified frame rate. The frame rate is ignored if it is higher than the browser can manage. Context menu contains Behaviors channel is various timeline-related commands. the channel for behaviors that should be executed at a particular frame in the timeline. Animation bars show the duration of each object’s animation. A single row can include multiple bars representing different objects. Different bars cannot control the same object in the same frame. Animating layers 213 Keyframes are frames in a bar where you have specified properties (such as position) for the object. Dreamweaver calculates intermediate values for frames in between keyframes. Small circles mark keyframes. Animation channels display bars for animating layers and images. Playback options The following are the playback options for viewing the animation. Rewind moves the playback head to the first frame in the timeline. Back moves the playback head one frame to the left. Click Back and hold down the mouse button to play the timeline backward. Play moves the playback head one frame to the right. Click Play and hold down the mouse button to play the timeline forward. Autoplay makes a timeline begin playing automatically when the current page loads in a browser. Autoplay attaches a behavior to the page’s body tag that executes the Play Timeline action when the page loads. Loop makes the current timeline loop indefinitely while the page is open in a browser. Loop inserts the Go to Timeline Frame behavior in the Behaviors channel after the last frame of the animation. Double-click the behavior’s marker in the Behaviors channel to edit the parameters for this behavior and change the number of loops. Moving a layer using a timeline animation The most common kind of timeline animation involves moving a layer along a path. Timelines can move only layers. To make images or text move, create a layer using the Draw Layer button on the Insert bar and then insert images, text, or any other type of content in the layer (see “Inserting a layer” on page 200). Timelines can also change other attributes of layers and images; for more information, see “Changing image and layer properties with timelines” on page 217. To animate a layer using a timeline: 1. Move the layer to where it should be when the animation begins. 2. Select Window > Timelines. 214 Chapter 7: Laying Out Pages with CSS 3. Select the layer you want to animate. Make sure you have selected the desired element. Click the layer marker or the layer selection handle, or use the Layers panel to select a layer. For more information, see “Manipulating layers” on page 208. When a layer is selected, handles appear around it as shown in the following illustration. Click the layer selection handle to select the layer Selected layer with image inside Clicking inside the layer places a blinking insertion point inside the layer, but it does not select the layer. 4. Select Modify > Timeline > Add Object to Timeline or simply drag the selected layer into the Timelines panel. A bar appears in the first channel of the timeline. The name of the layer appears in the bar. 5. Click the keyframe marker at the end of the bar. 6. Move the layer on the page to where it should be at the end of the animation. A line appears showing the path of the animation in the Document window. 7. If you want the layer to move in a curve, select its animation bar and Control-click (Windows) or Command-click (Macintosh) a frame in the middle of the bar to add a keyframe at the frame you clicked, or click a frame in the middle of the animation bar and select Add Keyframe from the context menu. Repeat this step to define additional keyframes. 8. Hold down the Play button to preview the animation on the page. Repeat the procedure to add additional layers and images to the timeline and to create a more complex animation. Animating layers 215 Creating a timeline by dragging a path If you want to create an animation with a complex path, it may be more efficient to record the path as you drag the layer rather than creating individual keyframes. To create a timeline by dragging a path: 1. Select a layer. 2. Move the layer to where it should be when animation begins. Make sure you have selected the layer; if the insertion point is in the layer, the layer is not selected. To select a layer, click the layer marker or the layer selection handle, or use the Layers panel. For more information, see “Manipulating layers” on page 208. 3. Select Modify > Timeline > Record Path of Layer. 4. Drag the layer around the page to create a path. 5. Release the layer at the point where the animation should stop. Dreamweaver adds an animation bar to the timeline, containing the appropriate number of keyframes. 6. In the Timelines panel, click the Rewind button; then hold down the Play button to preview your animation. Modifying timelines After defining a timeline’s basic components, you can make changes such as adding and removing frames, changing the start time of the animation, and so on. To modify a timeline, do any of the following: ■ To make the animation play longer, drag the end frame marker to the right. All the keyframes in the animation shift so that their relative positions remain constant. To prevent the other keyframes from moving, Control-drag the end frame marker. ■ To make the layer reach a keyframe position earlier or later, move the keyframe marker left or right in the bar. ■ To change the start time of an animation, select one or more of the bars associated with the animation (press Shift to select more than one bar at a time) and drag left or right. ■ To shift the location of an entire animation path, select the entire bar and then drag the object on the page. Dreamweaver adjusts the position of all keyframes. Making any type of change with an entire bar selected changes all the keyframes. ■ To add or remove frames in the timeline, select Modify > Timeline > Add Frame or Modify > Timeline > Remove Frame. 216 Chapter 7: Laying Out Pages with CSS ■ To make the timeline play automatically when the page opens in a browser, click Autoplay. Autoplay attaches a behavior to the page that executes the Play Timeline action when the page loads. ■ To make the timeline loop continuously, click Loop. Loop inserts the Go To Timeline Frame action in the Behaviors channel after the last frame of the animation. You can edit the parameters for this behavior to define the number of loops. Changing image and layer properties with timelines In addition to moving layers with timelines, you can change the visibility, size, and stacking order of a layer; you can also change the source file of an image. To change image and layer properties with a timeline: 1. In the Timelines panel, do one of the following: ■ ■ 2. Create a new keyframe by clicking a frame in the middle of the animation bar and choosing Modify > Timeline > Add Keyframe. You can instead create a new keyframe by Control-clicking (Windows) or Command-clicking (Macintosh) a frame in the animation bar. Define new properties for the object by doing one of the following: ■ ■ ■ ■ 3. Select an existing keyframe in the bar controlling the object you want to change. (The start and end frames are always keyframes.) To change the source file of an image, click the folder icon next to the Src text box in the Property inspector, then browse to and select a new image. To change the visibility of a layer, select inherit, visible, or hidden from the pop-up menu in the Vis text box of the Property inspector. Alternatively, use the eye icons in the Layers panel. See “Changing layer visibility” on page 207. To change the size of a layer, drag the layer’s resize handles or enter new values in the Width and Height text boxes in the Property inspector. Not all browsers can dynamically change the size of a layer. To change the stacking order of a layer, enter a new value in the Z-Index text box or use the Layers panel to change the stacking order of the current layer (see “Changing the stacking order of layers” on page 206). Hold down the Play button to see the animation. Animating layers 217 Using multiple timelines Instead of trying to control all the action on a page with one timeline, it’s easier to work with separate timelines that control discrete parts of the page. For example, a page might include interactive elements that each trigger a different timeline. To manage multiple timelines, do any of the following: ■ To create a new timeline, select Modify > Timeline > Add Timeline. ■ To remove the selected timeline, select Modify > Timeline > Remove Timeline. This permanently removes all animations from the selected timeline. ■ To rename the selected timeline, select Modify > Timeline > Rename Timeline or enter a new name in the Timeline pop-up menu in the Timelines panel. ■ To view a different timeline in the Timelines panel, select a new timeline from the Timeline pop-up menu in the Timelines panel. Copying and pasting animations Once you have an animation sequence that you like, you can copy it and paste it into another area of the current timeline, into another timeline in the same document, or into a timeline in another document. You can also copy and paste multiple sequences at once. To cut or copy and paste animation sequences: 1. Click an animation bar to select a sequence. To select multiple sequences, Shift-click multiple animation bars; to select all sequences, press Control+A (Windows) or Command+A (Macintosh). 2. Copy or cut the selection. 3. Do one of the following: 4. ■ Move the playback head to another spot in the current timeline. ■ Select another timeline from the Timeline pop-up menu. ■ Open another document, or create a new one, and then click in the Timelines panel. Paste the selection into the timeline. Animation bars for the same object cannot overlap, because a layer cannot be in two places at one time (nor can an image have two different sources at a time). If the animation bar you are pasting would overlap another animation bar for the same object, Dreamweaver automatically shifts the selection to the first frame that doesn’t overlap. 218 Chapter 7: Laying Out Pages with CSS There are two principles to keep in mind when pasting animation sequences into another document: ■ If you copy an animation sequence for a layer and the new document contains a layer with the same name, Dreamweaver applies the animation properties to the existing layer in the new document. ■ If you copy an animation sequence for a layer and the new document does not contain a layer with the same name, Dreamweaver pastes the layer and its contents from the original document along with the animation sequence. To apply the pasted animation sequence to another layer in the new document, select Change Object from the context menu and select the name of the second layer from the pop-up menu. Delete the pasted layer if desired. Applying an animation sequence to a different object To save time, you can create an animation sequence once and apply it to each of the remaining layers in your document. To apply an existing animation sequence to other objects: 1. In the Timelines panel, select the animation sequence and copy it. 2. Click any frame of the Timelines panel and paste the sequence at that frame. 3. Right-click (Windows) or Control-click (Macintosh) the pasted animation sequence and select Change Object from the context menu. 4. In the dialog box that appears, select another object from the pop-up menu and click OK. 5. Repeat steps 2 through 4 for any remaining objects that you want to follow the same animation sequence. You can also change your mind about which layer should be animated after creating an animation sequence; simply follow steps 3 and 4 above (no copying or pasting is necessary). Animating layers 219 Renaming timelines You can rename a timeline. To rename the timeline currently displayed in the Timelines panel: 1. Select Modify > Timeline > Rename Timeline. 2. In the Rename Timeline dialog box, enter a new name. If your document contains the Play Timeline behavior action (for example, if it contains a button that the visitor must click to start the timeline), you must edit the behavior to reflect the new timeline name. Animation tips for timelines The following suggestions can improve the performance of your animations and make creating animations easier: ■ Show and hide layers instead of changing the source file for multiple-image animations. Switching the source file of an image can slow down the animation, because the new image must be downloaded. There will be no noticeable pauses or missing images if all images are downloaded at once in hidden layers before the animation runs. ■ Extend animation bars to create smoother motion. If animation looks choppy and images jump between positions, drag the end frame of the layer’s animation bar to extend the motion over more frames. Making the animation bar longer creates more data points between the start and end point of the movement and also makes the object move more slowly. Try increasing the number of frames per second (fps) to improve speed, but be aware that most browsers running on average systems cannot animate much faster than 15 fps. Test the animation on different systems with different browsers to find the best settings. ■ Don’t animate large bitmaps. Animating large images results in slow animations. Instead, create composites and move small parts of the image. For example, show a car moving by animating only the wheels. ■ Create simple animations. Do not create animations that demand more than current browsers can provide. Browsers always play every frame in a timeline animation, even when system or Internet performance decreases. 220 Chapter 7: Laying Out Pages with CSS Inserting div tags for layout You can use div tags to create CSS layout blocks and position them in your document. This is especially useful if you have an existing CSS style sheet with positioning styles attached to your document. Dreamweaver enables you to quickly insert a div tag and apply existing styles to it. NO T E You can use a Dreamweaver design file as a starting point for your CSS layout. Select a file from the Page Designs (CSS) category of the New Document dialog box (see “Creating a document based on a Dreamweaver design file” on page 93). To insert a div tag: 1. In the Document window, place the insertion point where you want the div tag to appear. 2. Do one of the following: ■ Select Insert > Layout Objects > Div Tag. ■ In the Layout category of the Insert bar, click the Div Tag button. The Insert Div Tag dialog box appears. 3. Complete the dialog box. For more information, click the Help button in the dialog box. 4. Click OK. The div tag appears as a box in your document with placeholder text. When you move the pointer over the edge of the box, Dreamweaver highlights it. If the div tag is absolutely positioned, it acts like a Dreamweaver layer. For information about working with layers, see “Setting layer preferences and properties” on page 202, “Managing layers” on page 204, or “Manipulating layers” on page 208. For information about working with div tags that aren’t absolutely positioned, see “Working with div tags for layout” on page 222. Inserting div tags for layout 221 Related topics ■ “Changing the highlight color for div tags” on page 223 Working with div tags for layout After you insert a div tag (see “Inserting div tags for layout” on page 221), you can manipulate it or you can add content to it. NO T E Div tags that are absolutely positioned are Dreamweaver layers. For information about working with these div tags, skip this section and see “Setting layer preferences and properties” on page 202, “Managing layers” on page 204, or “Manipulating layers” on page 208. Div tags have visible borders when you’ve assigned borders to them, or when you have CSS Layout Outlines selected. (CSS Layout Outlines is selected by default in the View > Visual Aids menu.) When you move the pointer over a div tag, Dreamweaver highlights the tag. To change the highlight color or disable highlighting, see “Changing the highlight color for div tags” on page 223. When you select a div tag, you can view and edit rules for it in the CSS Styles panel. You can also add content to the div tag by simply placing your insertion point inside the div tag, and then adding content just as you would add content to a page. To view and edit rules applied to a div tag: 1. Do one of the following to select the div tag: ■ Click the border of the div tag. TIP ■ ■ 2. Look for the highlighting to see the border. Click inside the div tag, and press Control+A (Windows) or Command+A (Macintosh) twice. Click inside the div tag, then select the div tag from the tag selector at the bottom of the Document window. Select Window > CSS Styles to open the CSS Styles panel if it is not already open. Rules applied to the div tag appear in the panel. 3. Make edits as necessary. To place the insertion point in a div tag to add content: ■ Click anywhere inside the tag’s borders. 222 Chapter 7: Laying Out Pages with CSS To change the placeholder text in a div tag: ■ Select the text, and then type over it or press Delete. N OT E You can add content to the div tag just as you would add content to a page. Related topics ■ “Inserting div tags for layout” on page 221 ■ “Using the CSS Styles panel” on page 394 Changing the highlight color for div tags When you move the pointer over the edge of a div tag in Design view, Dreamweaver highlights the borders of the tag. You can enable or disable highlighting as necessary, or change the highlight color in the Preferences dialog box. To change highlighting preferences for div tags: 1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh). The Preferences dialog box appears. 2. Select Highlighting from the category list on the left. 3. Make either of the following changes: ■ To change the highlighting color for div tags, click the Mouse-Over color box, and then select a highlight color using the color picker (or enter the hexadecimal value for the highlight color in the text box). For information about using the color picker, see “Working with colors” on page 350. ■ To enable or disable highlighting for div tags, select or deselect the Show checkbox for Mouse-Over. N O TE 4. These options affect all objects, such as tables, that Dreamweaver highlights when you move the pointer over them. Click OK. Changing the highlight color for div tags 223 Working with CSS layout visualization Dreamweaver includes a number of visualization features that let you display elements of your CSS layout in Design view. For example, you can display the outlines of div tags that don’t have borders assigned to them, or you can display temporary background colors for div tags so that you can see their location on the page. This section includes the following topics: ■ “About CSS layout visualization” on page 224 ■ “Viewing CSS layout blocks” on page 225 ■ “Using Design-time style sheets with CSS layout blocks” on page 225 About CSS layout visualization Dreamweaver lets you visualize CSS layout blocks while you work in Design view. A CSS layout block is an HTML page element that you can position anywhere on your page. More specifically, a CSS layout block is either a div tag without display:inline, or any other page element that includes the display:block, position:absolute, or position:relative CSS declarations. Following are a few examples of elements that are considered CSS layout blocks in Dreamweaver: ■ A div tag ■ An image with an absolute or relative position assigned to it ■ An a tag with the display:block style assigned to it ■ A paragraph with an absolute or relative position assigned to it NO T E For purposes of visual rendering, CSS layout blocks do not include inline elements (that is, elements whose code falls within a line of text), or simple block elements like paragraphs. Dreamweaver provides a number of visual aids for viewing CSS layout blocks. For example, you can enable outlines, backgrounds, and the box model for CSS layout blocks while you design. You can also view tooltips that display properties for a selected CSS layout block when you float the mouse pointer over the layout block. The following list of CSS layout block visual aids describes what Dreamweaver renders as visible for each: CSS Layout Outlines shows you the outlines of all CSS layout blocks on the page. CSS Layout Backgrounds shows you temporarily assigned background colors for individual CSS layout blocks, and hides any other background colors or images that normally appear on the page. 224 Chapter 7: Laying Out Pages with CSS Whenever you enable the visual aid to view CSS layout block backgrounds, Dreamweaver automatically assigns each CSS layout block a distinct background color. (Dreamweaver selects the colors using an algorithmic process—there is no way for you to assign the colors yourself.) The assigned colors are visually distinctive, and are designed to help you differentiate between CSS layout blocks. CSS Layout Box Model shows you the box model (that is, padding and margins) of the selected CSS layout block. Viewing CSS layout blocks You can enable or disable CSS layout block visual aids as necessary. For an explanation of what each visual aid renders, see “About CSS layout visualization” on page 224. To view CSS layout block outlines: ■ Select View > Visual Aids > CSS Layout Outlines. To view CSS layout block backgrounds: ■ Select View > Visual Aids > CSS Layout Backgrounds. To view CSS layout block box models: ■ Select View > Visual Aids > CSS Layout Box Model. You can also access CSS layout block visual aid options by clicking the Visual Aids button on the Document toolbar. Using Design-time style sheets with CSS layout blocks You can use a Design-time style sheet to display the backgrounds, borders, or box model for elements that aren’t normally considered CSS layout blocks. To do so, you must first create a Design-time style sheet that assigns the display:block attribute to the appropriate page element. Working with CSS layout visualization 225 To use CSS layout block visual aids with non-CSS layout block elements: 1. Create an external CSS style sheet by selecting File > New, selecting Basic page in the Category column, selecting CSS in the Basic page column, and clicking Create. 2. In the new style sheet, create rules that assign the display:block attribute to the page elements you want to display as CSS layout blocks. For example, if you wanted to display a background color for paragraphs and list items, you could create a style sheet with the following rules: p{ display:block; } li{ display:block; } 3. Save the file. 4. In Design view, open the page to which you want to attach the new styles. 5. Select Text > CSS Styles > Design-time. 6. In the Design-time Style Sheets dialog box, click the plus (+) button above the Show Only at Design Time text box, select the style sheet you just created, and click OK. 7. Click OK to close the Design-time Style Sheets dialog box. The style sheet is attached to your document. If you had created a style sheet using the previous example, all paragraphs and list items would be formatted with the display:block attribute, thereby allowing you to enable or disable CSS layout block visual aids for paragraphs and list items. Related topics ■ “Using Design-Time style sheets” on page 403 Using rulers, guides, and the grid to lay out pages Use rulers, guides, and the grid as visual aids for positioning, measuring, or resizing elements in the Design view of the Document window. Using rulers Rulers help you measure, organize, and plan your layout. They can appear on the left and top borders of the page, marked in pixels, inches, or centimeters. 226 Chapter 7: Laying Out Pages with CSS To change ruler settings, do one of the following: ■ To toggle rulers on and off, select View > Rulers > Show. ■ To change the origin, drag the ruler-origin icon (at the upper-left corner of the Design view of the Document window) anywhere on the page. To reset the origin to its default position, select View > Rulers > Reset Origin. ■ To change the unit of measure, select Pixels, Inches, or Centimeters from the View > Rulers submenu. Using guides Guides are lines that you drag onto the document from the rulers. They help you place and align objects more precisely. You can also use guides to measure the size of page elements, or emulate the folds (visible areas) of web browsers. To help you align elements, Dreamweaver lets you snap elements to guides, and snap guides to elements. (Elements must be absolutely positioned in order for the snap feature to work.) You can also lock guides to prevent them from being accidentally moved by another user. To create a horizontal or vertical guide: 1. Drag from the corresponding ruler. 2. Position the guide in the Document window and release the mouse button. You can reposition the guide by dragging it again. NO T E By default, guides are recorded as absolute pixel measurements from the top or left side of the document, and are shown relative to the origin of the ruler. To record the guide as a percentage, press the Shift key while you create or move the guide. To show or hide guides: ■ Select View > Guides > Show Guides. To snap elements to guides: ■ Select View > Guides > Snap to Guides. NO T E When you resize elements, such as layers, tables, and images, the resized elements snap to guides. To snap guides to elements: ■ Select View > Guides > Guides Snap to Elements. To lock or unlock all guides: ■ Select View > Guides > Lock Guides. Using rulers, guides, and the grid to lay out pages 227 To move a guide to a specific position: 1. Double-click the guide. 2. Enter the new position in the Move Guide dialog box, and click OK. To view the position of a guide: ■ Hold the mouse pointer over the guide. To view the distance between guides: ■ Press Control (Windows) or Command (Macintosh) and hold the mouse pointer anywhere between the two guides. N OT E The unit of measure is the same as the unit of measure used for the rulers. To change guide color: 1. Select View > Guides > Edit Guides. 2. Select the new guide color from the Guide Color pop-up menu, and click OK. To change the color that indicates the distance between guides: 1. Select View > Guides > Edit Guides. 2. Select the color from the Distance Color pop-up menu, and click OK. To emulate the fold (visible area) of a web browser: ■ Select View > Guides, and then select a preset browser size from the menu. To remove a guide: ■ Drag the guide off the document. To clear all guides: ■ Select View > Guides > Clear Guides. Using guides with templates When guides are added to a Dreamweaver template, all instances of the template inherit the guides. Guides in template instances, however, are treated as editable regions, so users can modify them. Modified guides in template instances are restored to their original location whenever the instance is updated with the master template. You can also add your own guides to instances of a template. Guides added in this manner are not overwritten when the template instance is updated with the master template. 228 Chapter 7: Laying Out Pages with CSS Related topics ■ “Resizing layers” on page 208 ■ “Moving layers” on page 209 ■ “Aligning layers” on page 210 Using the grid The grid displays a system of horizontal and vertical lines in the Document window. It is useful for placing objects precisely. You can make absolutely-positioned page elements automatically snap to the grid as you move them, and change the grid or control the snapping behavior by specifying grid settings. Snapping works whether or not the grid is visible. To show or hide the grid: ■ Select View > Grid > Show Grid. To enable or disable snapping: ■ Select View > Grid > Snap to Grid. To change grid settings: 1. Select View > Grid > Grid Settings. The Grid Settings dialog box appears. 2. Set options as desired. For more information, click the Help button in the dialog box. 3. Click OK. Related topics ■ “Resizing layers” on page 208 ■ “Moving layers” on page 209 ■ “Aligning layers” on page 210 Using rulers, guides, and the grid to lay out pages 229 Using a tracing image You can use a tracing image as a guide to re-create a page design that was created in a graphics application such as Macromedia Freehand or Fireworks. A tracing image is a JPEG, GIF, or PNG image that is placed in the background of the Document window. You can hide the image, set its opacity, and change its position. To place a tracing image in the Document window: 1. Do one of the following: ■ ■ 2. Select View > Tracing Image > Load. Select Modify > Page Properties, then click the Browse button next to the Tracing Image text box. In the dialog box that appears, select an image file, then click Select (Windows) or Choose (Macintosh). The Page Properties dialog box appears. 3. Specify the transparency for the image by dragging the Image Transparency slider, then click OK. To switch to another tracing image or change the transparency of the current tracing image at any time, select Modify > Page Properties. To show or hide the tracing image: ■ Select View > Tracing Image > Show. The tracing image is visible only in Dreamweaver. It is never visible when you view the page in a browser. When the tracing image is visible, the page’s real background image and color are not visible in the Document window; however, the background image and color will be visible when the page is viewed in a browser. To change the position of a tracing image: 1. Select View > Tracing Image > Adjust Position. 2. Do one of the following: ■ To precisely specify the position of the tracing image, enter coordinate values in the X and Y text boxes. ■ To move the image one pixel at a time, use the arrow keys. ■ To move the image 5 pixels at a time, press Shift and an arrow key. 230 Chapter 7: Laying Out Pages with CSS To reset the position of the tracing image: ■ Select View > Tracing Image > Reset Position. The tracing image returns to the upper-left corner of the Document window (0,0). To align the tracing image to a selected element: 1. Select an element in the Document window. 2. Select View > Tracing Image > Align with Selection. The upper-left corner of the tracing image is aligned with the upper-left corner of the selected element. Using a tracing image 231 232 Chapter 7: Laying Out Pages with CSS CHAPTER 8 8 Presenting Content with Tables Tables are a powerful tool for presenting tabular data and for laying out text and graphics on a page. Many designers use tables to lay out web pages. Macromedia Dreamweaver 8 provides two ways to view and manipulate tables: Standard mode, in which tables are presented as a grid of rows and columns, and Layout mode, which allows you to draw, resize, and move boxes on the page while still using tables for the underlying structure (see Chapter 9, “Laying Out Pages in Layout Mode,” on page 257). NO TE You can also lay out your pages using CSS positioning (see Chapter 7, “Laying Out Pages with CSS,” on page 197). This chapter contains the following sections: About tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234 Inserting a table and adding content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235 Importing and exporting tabular data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Selecting table elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 Using Expanded Tables mode for easier table editing . . . . . . . . . . . . . . . . . . . . . . . . 241 Formatting tables and cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243 Resizing tables, columns, and rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Adding and removing rows and columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Splitting and merging cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Copying, pasting, and deleting cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253 Nesting tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 Sorting tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 233 About tables Tables are a powerful tool for presenting tabular data and for laying out text and graphics on an HTML page. A table consists of one or more rows; each row consists of one or more cells. Although columns aren’t usually explicitly specified in HTML code, Dreamweaver enables you to manipulate columns as well as rows and cells. Dreamweaver displays the table width and the column width for each table column when the table is selected or when the insertion point is in the table. Next to the widths are arrows for the table header menu and the column header menus. Use the menus for quick access to some common table-related commands. You can enable or disable the widths and menus as necessary (see “Displaying table and column widths and menus” on page 249). If you do not see a width for the table or for a column, then that table or column does not have a specified width in the HTML code. If two numbers appear, then the visual width as it appears in Design view doesn’t match the width specified in the HTML code. This can happen when you resize a table by dragging its lower-right corner or when you add content to a cell that’s larger than its set width. For example, if you set a column’s width to 200 pixels, then add content that stretches the width to 250 pixels, two numbers appear for that column: 200 (the width specified in the code) and (250) in parentheses (the visual width of the column as it’s rendered on your screen). To reconcile the column widths, see “Making column widths in code consistent with visual widths” on page 248. Related topics ■ “Inserting a table and adding content” on page 235 Table formatting precedence in HTML When formatting tables in Design view, you can set properties for the entire table or for selected rows, columns, or cells in the table. When a property, such as background color or alignment, is set to one value for the whole table and another value for individual cells, cell formatting takes precedence over row formatting, which in turn takes precedence over table formatting. The order of precedence for table formatting is: 1. Cells 2. Rows 3. Table 234 Chapter 8: Presenting Content with Tables For example, if you set the background color for a single cell to blue, then set the background color of the entire table to yellow, the blue cell does not change to yellow, since cell formatting takes precedence over table formatting. NO TE When you set properties on a column, Dreamweaver changes the attributes of the td tag corresponding to each cell in the column. Related topics ■ “Formatting tables and cells” on page 243 About splitting and merging table cells You can merge any number of adjacent cells—as long as the entire selection is a line or a rectangle of cells—to produce a single cell that spans several columns or rows. You can split a cell into any number of rows or columns, regardless of whether it was previously merged. Dreamweaver automatically restructures the table (adding any necessary colspan or rowspan attributes) to create the specified arrangement. In the following illustration, the cells in the middle of the first two rows have been merged into a single cell that spans two rows. Related topics ■ “Splitting and merging cells” on page 251 Inserting a table and adding content Use the Insert bar or the Insert menu to create a new table. Then, add text and images to table cells the same way that you add text and images outside of a table (see Chapter 13, “Inserting and Formatting Text,” on page 369 and Chapter 14, “Inserting Images,” on page 407). Inserting a table and adding content 235 To insert a table: 1. In the Design view of the Document window, place the insertion point where you want the table to appear. NO TE 2. If your document is blank, then the only place you can place the insertion point is at the beginning of the document. Do one of the following: ■ Select Insert > Table. ■ In the Common category of the Insert bar, click the Table button. The Insert Table dialog box appears. 3. Complete the dialog box. For more information, click the Help button in the dialog box. 4. Click OK. The table appears in the document. Related topics ■ “Viewing and setting table, cell, row, and column properties” on page 243 ■ “Editing accessibility attributes for a table” on page 244 236 Chapter 8: Presenting Content with Tables Importing and exporting tabular data Tabular data that has been created in another application (such as Microsoft Excel) and saved in a delimited text format (with items separated by tabs, commas, colons, semicolons, or other delimiters) can be imported into Dreamweaver and formatted as a table. You can also export table data from Dreamweaver into a text file, with the contents of adjacent cells separated by a delimiter. You can use commas, colons, semicolons, or spaces as delimiters. When you export a table, the entire table is exported; you cannot select portions of a table to export. TIP If you want only some of the data from a table—for example, the first six rows or the first six columns—then copy the cells containing that data, paste those cells outside of the table (to create a new table), and export the new table. To import table data: 1. Do one of the following: ■ Select File > Import > Tabular Data. ■ Select Insert > Table Objects > Import Tabular Data. The Import Tabular Data dialog box appears. 2. In the dialog box, enter information about the file containing your data. For more information, click the Help button in the dialog box. 3. Click OK. Importing and exporting tabular data 237 To export a table: 1. Place the insertion point in any cell of the table. 2. Select File > Export > Table. The Export Table dialog box appears. 3. In the Export Table dialog box, specify options for exporting the table. For more information, click the Help button in the dialog box. 4. Click Export. The Export Table As dialog box appears. 5. Enter a name for the file. 6. Click Save. Selecting table elements You can select an entire table, row, or column at once. You can also select one or more individual cells. When you move your pointer over a table, row, column, or cell, Dreamweaver highlights all the cells in that selection so that you know exactly which cells will be selected if you click the selection. This is useful when you have tables without borders, cells that span multiple columns or rows, or nested tables. You can change the highlight color in preferences. TIP If you position the pointer over a table’s border, then hold the Control key (Windows) or Command key (Macintosh), the entire structure of the table—that is, all cells in the table— is highlighted. This is useful when you have nested tables and want to see the structure of one of the tables. To change the highlight color for selecting table elements: 1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh). The Preferences dialog box appears. 2. Select Highlighting from the category list on the left. 238 Chapter 8: Presenting Content with Tables 3. Make either of the following changes: ■ To change the highlighting color for table elements, click the Mouse-over color box, then select a highlight color using the color picker (or enter the hexadecimal value for the highlight color in the text box). For information about using the color picker, see “Working with colors” on page 350. ■ To enable or disable highlighting for table elements, select or deselect the Show checkbox for Mouse-over. N OT E 4. These options affect all objects, such as layers and Layout mode view tables and cells, that Dreamweaver highlights when you move the pointer over them. Click OK. Related topics ■ “Formatting tables and cells” on page 243 ■ “Resizing tables, columns, and rows” on page 245 ■ “Copying, pasting, and deleting cells” on page 253 Selecting a table There are several ways you can select an entire table at once. To select an entire table, do one of the following: ■ Click the upper-left corner of the table, anywhere on the top or bottom edge of the table, or on a row or column’s border. N OT E The pointer changes to the table grid icon when you can select the table (unless you click a row or column border). ■ Click in a table cell, then select the tag in the tag selector at the lower-left corner of the Document window. ■ Click in a table cell, then select Modify > Table > Select Table. ■ Click in a table cell, click the table header menu, then select Select Table. Selection handles appear on the selected table’s lower and right edges. Selecting table elements 239 Related topics ■ “Selecting cells” on page 240 Selecting rows or columns You can select an individual row or column or multiple rows or columns. To select individual or multiple rows or columns: 1. Position the pointer to point to the left edge of a row or the top edge of a column. 2. When the pointer changes to a selection arrow, click to select a row or column, or drag to select multiple rows or columns. To select a single column: 1. Click in the column. 2. Click the column header menu, then select Select Column. Related topics ■ “Selecting a table” on page 239 Selecting cells You can select a single cell, a line or block of cells, or nonadjacent cells. To select entire rows or columns, see “Selecting rows or columns” on page 240. To select a single cell, do one of the following: ■ Click in the cell, then select the
tag in the tag selector at the lower-left corner of the Document window. ■ Control-click (Windows) or Command-click (Macintosh) in the cell. 240 Chapter 8: Presenting Content with Tables ■ Click in the cell, then select Edit > Select All. TI P Select Edit > Select All again when a cell is selected to select the entire table. To select a line or a rectangular block of cells, do one of the following: ■ Drag from a cell to another cell. ■ Click in one cell, Control-click (Windows) or Command-click (Macintosh) in the same cell to select it, then Shift-click another cell. All of the cells within the linear or rectangular region defined by the two cells are selected. To select nonadjacent cells: ■ Control-click (Windows) or Command-click (Macintosh) the cells, rows, or columns you want to select. If each cell, row, or column you Control-click or Command-click isn’t already selected, it’s added to the selection. If it is already selected, it’s removed from the selection. Related topics ■ “Selecting a table” on page 239 Using Expanded Tables mode for easier table editing Expanded Tables mode temporarily adds cell padding and spacing to all tables in a document and increases the tables’ borders to make editing easier. This mode enables you to select items in tables or precisely place the insertion point. Using Expanded Tables mode for easier table editing 241 For example, you might expand a table to place the insertion point to the left or right of an image, without inadvertently selecting the image or table cell. NO TE Once you make your selection or place the insertion point, you should return to the Standard mode of Design view to make your edits. Some visual operations, such as resizing, will not give expected results in Expanded Tables mode. To switch into Expanded Tables mode: 1. If you are working in Code view, select View > Design or View > Code and Design. You cannot switch to Expanded Tables mode in Code view. 2. Do one of the following: ■ Select View > Table Mode > Expanded Tables Mode. ■ In the Layout category of the Insert bar, click the Expanded Tables Mode button. A bar labeled Expanded Tables Mode appears across the top of the Document window. Dreamweaver adds cell padding and spacing to all tables on the page and increases the tables’ borders. To switch out of Expanded Tables mode, do one of the following: ■ Click Exit in the bar labeled Expanded Tables Mode at the top of the Document window. ■ Select View > Table Mode > Standard Mode. ■ In the Layout category of the Insert bar, click the Standard Mode button. Dreamweaver returns to Standard mode. 242 Chapter 8: Presenting Content with Tables Formatting tables and cells You can change the appearance of tables by setting properties for the table and its cells or by applying a preset design to the table. Before you set table and cell properties, it’s a good idea to understand which properties have precedence over the others (see “Table formatting precedence in HTML” on page 234). TIP To format the text inside a table cell, use the same procedures you would use to format text outside of a table. For more information, see Chapter 13, “Inserting and Formatting Text,” on page 369. Related topics ■ “Resizing tables, columns, and rows” on page 245 Viewing and setting table, cell, row, and column properties When a table or cell is selected, the Property inspector lets you view and change its properties. NO TE Before you change properties for table elements, it’s a good idea to understand which properties have precedence over the others (see “Table formatting precedence in HTML” on page 234). To view and set table or table element properties: 1. Select a table, cell, row, or column (see “Selecting table elements” on page 238). 2. In the Property inspector (Window > Properties), click the expander arrow in the lowerright corner to see all the properties. 3. Change properties as necessary. For more information, click the Help button in the Property inspector. N OT E When you set properties on a column, Dreamweaver changes the attributes of the td tag corresponding to each cell in the column. When you set certain properties for a row, however, Dreamweaver changes the attributes of the tr tag rather than changing the attributes of each td tag in the row, When you’re applying the same format to all the cells in a row, applying the format to the tr tag produces cleaner, more concise HTML code. Formatting tables and cells 243 Editing accessibility attributes for a table If you did not add accessibility attributes for your table when you inserted it (see “Inserting a table and adding content” on page 235) and need to add them later, or if you need to edit accessibility attributes, you can do so in Code view or Design view. To add or edit accessibility values for a table in Code view: ■ Edit the appropriate attributes in the code. TIP To quickly locate the tags in the code, click in the table, then select the tag in the tag selector at the bottom of the Document window. To add or edit accessibility values for a table in Design view, do any of the following: ■ To edit the table caption, highlight the caption, then type a new caption. ■ To edit the caption alignment, place the insertion point in the table caption, right-click (Windows) or Control-click (Macintosh), then select Edit Tag Code. ■ To edit the table summary, select the table, right-click (Windows) or Control-click (Macintosh), then select Edit Tag Code. Related topics ■ “Viewing and setting table, cell, row, and column properties” on page 243 Using a design scheme to format a table Use the Format Table command to quickly apply a preset design to a table. You can then select options to further customize the design. N OT E Only simple tables can be formatted using preset designs. You can’t use these designs to format tables that contain merged cells (colspan or rowspan) or column groups, or any other table that doesn’t consist of a simple rectangular grid of cells. To use a preset table design: 1. Select a table (see “Selecting a table” on page 239). 2. Select Commands > Format Table. 244 Chapter 8: Presenting Content with Tables The Format Table dialog box appears. 3. Customize options as desired. For more information, click the Help button in the dialog box. 4. Click Apply or OK to format your table with the selected design. Resizing tables, columns, and rows You can resize an entire table or individual rows and columns. If you have trouble resizing, you can clear the column widths or row heights and start over. Sometimes the column widths set in the HTML code do not match their apparent widths on the screen. When this happens, you can make the widths consistent. Table and column widths and header menus appear in Dreamweaver to help you lay out your tables; you can enable or disable the widths and menus as necessary. Resizing tables, columns, and rows 245 Resizing a table You can resize a table by dragging one of its selection handles. Dreamweaver displays the table width, along with a table header menu, at the top or bottom of the table when the table is selected or the insertion point is in the table. NO TE You can disable the table width and table header menu if necessary (see “Displaying table and column widths and menus” on page 249). When you resize an entire table, all of the cells in the table change size proportionately. If a table’s cells have explicit widths or heights specified, resizing the table changes the visual size of the cells in the Document window but does not change the specified widths and heights of the cells. To clear set widths or heights, see “Clearing set widths and heights” on page 249. To resize a table: 1. Select the table (see “Selecting a table” on page 239). Selection handles appear on the table. 2. Do one of the following: ■ To resize the table horizontally, drag the selection handle on the right. ■ To resize the table vertically, drag the selection handle on the bottom. ■ To resize the table in both dimensions, drag the selection handle at the lower-right corner. Resizing columns and rows You can change the width of a column or the height of a row in the Property inspector or by dragging the borders of the column or row. If you have trouble resizing, you can clear the column widths or row heights and start over (see “Clearing set widths and heights” on page 249). N O TE 246 You can also change cell widths and heights directly in the HTML code using Code view. For more information, see “Coding in Dreamweaver” on page 549. Chapter 8: Presenting Content with Tables Dreamweaver displays column widths, along with column header menus, at the tops or bottoms of columns when the table is selected or the insertion point is in the table. For more information, see “About tables” on page 234. NO TE You can disable the column widths and column header menus if necessary (see “Displaying table and column widths and menus” on page 249). To change a column’s width and keep the overall table width: ■ Drag the right border of the column you want to change. The width of the adjacent column also changes, so you actually resize two columns. Visual feedback shows you how the columns will adjust; the overall table width does not change. N OT E In tables with percentage-based widths (not pixels), if you drag the right border of the rightmost column, the whole table’s width changes, and all of the columns grow wider or narrow proportionately. To change a column’s width and maintain the size of the other columns: ■ Hold the Shift key, then drag the column’s border. The width of one column changes. Visual feedback shows you how the columns will adjust; the overall table width changes to accommodate the column you are resizing. To change a row’s height visually: ■ Drag the lower border of the row. To set a column’s width or a row’s height using the Property inspector: 1. Select the column or row (see “Selecting rows or columns” on page 240). 2. In the Property inspector (Window > Properties), enter a value in the W text field for the column’s width or in the H text field for the row’s height. Resizing tables, columns, and rows 247 For more information, click the Help button in the Property inspector. TI P 3. You can specify widths and heights as either pixels or percentages, and you can convert from pixels to percentages and back. Press Tab or Enter (Windows) or Return (Macintosh) to apply the value. Related topics ■ “Resizing a table” on page 246 ■ “Clearing set widths and heights” on page 249 ■ “Displaying table and column widths and menus” on page 249 Making column widths in code consistent with visual widths If you see two numbers for a column’s width, then the column width set in the HTML code does not match the column’s apparent width on the screen. You can make the width specified in the code match the visual width. For more information, see “About tables” on page 234. To make widths consistent: 1. Click in a cell. 2. Click the table header menu, then select Make All Widths Consistent. Dreamweaver resets the width specified in the code to match the visual width. Related topics ■ “Resizing a table” on page 246 ■ “Resizing columns and rows” on page 246 248 Chapter 8: Presenting Content with Tables Clearing set widths and heights You might want to clear set widths and heights before you resize a table, or if you have trouble resizing a table or individual columns or rows and want to start over. NO T E When you resize a table by dragging one of its selection handles, you change the visual size of the cells in the table, but you do not change any specified widths or heights of cells. It’s a good idea to clear set widths and heights before resizing. To clear all set widths or heights in a table: 1. Select the table (see “Selecting a table” on page 239). 2. Do one of the following: ■ ■ ■ Select Modify > Table > Clear Cell Widths or Modify > Table > Clear Cell Heights. In the Property inspector (Window > Properties), click the Clear Row Heights button or the Clear Column Widths button. Click the table header menu, then select Clear All Heights or Clear All Widths. To clear a column’s set width: 1. Click in the column. 2. Click the column header menu, then select Clear Column Width. Related topics ■ “Resizing a table” on page 246 ■ “Resizing columns and rows” on page 246 ■ “Making column widths in code consistent with visual widths” on page 248 Displaying table and column widths and menus Dreamweaver displays table and column widths, along with arrows to access the table header menu and the column header menus, when a table is selected or when the insertion point is in the table. (For more information, see “About tables” on page 234.) You can enable and disable the widths and menus as necessary. Resizing tables, columns, and rows 249 To enable or disable table and column widths and menus, do one of the following: ■ Select View > Visual Aids > Table Widths. ■ Right-click (Windows) or Control-click (Macintosh) in the table, then select Table > Table Widths. Related topics ■ “Resizing a table” on page 246 ■ “Resizing columns and rows” on page 246 Adding and removing rows and columns To add and remove rows and columns, use the Modify > Table or column header menu. TIP Pressing Tab in the last cell of a table automatically adds another row to the table. To add a single row or column: 1. Click in a cell. 2. Do one of the following: ■ Select Modify > Table > Insert Row or Modify > Table > Insert Column. A row appears above the insertion point or a column appears to the left of the insertion point. ■ Click the column header menu, and then select Insert Column Left or Insert Column Right. A column appears to the left or right of the insertion point. To add multiple rows or columns: 1. Click in a cell. 2. Select Modify > Table > Insert Rows or Columns. The Insert Rows or Columns dialog box appears. 250 Chapter 8: Presenting Content with Tables 3. Select Rows or Columns, then complete the dialog box. For more information, click the Help button in the dialog box. 4. Click OK. The rows or columns appear in the table. To delete a row or column, do one of the following: ■ Click in a cell within the row or column you want to delete, then select Modify > Table > Delete Row or Modify > Table > Delete Column. ■ Select a complete row or column (see “Selecting rows or columns” on page 240), then select Edit > Clear or press the Delete key. The entire row or column disappears from the table. To add or delete rows or columns using the Property inspector: 1. Select the table (see “Selecting a table” on page 239). 2. In the Property inspector (Windows > Properties), do one of the following: ■ Increase or decrease the Rows value to add or delete rows. Dreamweaver adds and removes rows at the bottom of the table. ■ Increase or decrease the Cols value to add or delete columns. Dreamweaver adds and removes columns at the right side of the table. N OT E Dreamweaver does not warn you if you are deleting rows and columns that contain data. Related topics ■ “Inserting a repeating table” on page 319 ■ “Displaying multiple recordset results” on page 729 Splitting and merging cells Use the Property inspector or the commands in the Modify > Table submenu to split or merge cells. For more information, see “About splitting and merging table cells” on page 235. As an alternative approach to merging and splitting cells, Dreamweaver also provides tools for increasing and decreasing the number of rows or columns spanned by a cell. Splitting and merging cells 251 To merge two or more cells in a table: 1. Select the cells in a contiguous line and in the shape of a rectangle. In the following illustration, the selection is a rectangle of cells, so the cells can be merged. In the following illustration, the selection is not a rectangle, so the cells can’t be merged. 2. Do one of the following: ■ ■ Select Modify > Table > Merge Cells. In the expanded Property inspector (Window > Properties), click the Merge Cells button. N O TE If you don’t see the button, click the arrow in the lower-right corner of the Property inspector so that you see all the options. The contents of the individual cells are placed in the resulting merged cell. The properties of the first cell selected are applied to the merged cell. To split a cell: 1. Click in the cell. 2. Do one of the following: ■ ■ Select Modify > Table > Split Cell. In the expanded Property inspector (Window > Properties), click the Split Cell button. N OT E 252 If you don’t see the button, click the arrow in the lower-right corner of the Property inspector so that you see all the options. Chapter 8: Presenting Content with Tables 3. In the Split Cell dialog box, specify how to split the cell. For more information, click the Help button in the dialog box. To increase or decrease the number of rows or columns spanned by a cell: 1. Select a cell. 2. Do one of the following: ■ ■ Select Modify > Table > Increase Row Span or Modify > Table > Increase Column Span. Select Modify > Table > Decrease Row Span or Modify > Table > Decrease Column Span. Copying, pasting, and deleting cells You can copy, paste, or delete a single table cell or multiple cells at once, preserving the cells’ formatting. You can paste cells at the insertion point or in place of a selection in an existing table. To paste multiple table cells, the contents of the Clipboard must be compatible with the structure of the table or the selection in the table in which the cells will be pasted. To cut or copy table cells: 1. Select one cell or multiple cells in a contiguous line and in the shape of a rectangle. In the following illustration, the selection is a rectangle of cells, so the cells can be cut or copied. Copying, pasting, and deleting cells 253 In the following illustration, the selection is not a rectangle, so the cells can’t be cut or copied. 2. Select Edit > Cut or Edit > Copy. N OT E If you selected an entire row or column and you select Edit > Cut, the entire row or column is removed from the table (not just the contents of the cells). To paste table cells: 1. Select where you want to paste the cells: ■ To replace existing cells with the cells you are pasting, select a set of existing cells with the same layout as the cells on the clipboard. For example, if you’ve copied or cut a 3 x 2 block of cells, you can select another 3 x 2 block of cells to replace by pasting. ■ To paste a full row of cells above a particular cell, click in that cell. ■ To paste a full column of cells to the left of a particular cell, click in that cell. N OT E ■ 2. If you have less than a full row or column of cells in the clipboard, and you click in a cell and paste the cells from the clipboard, the cell you clicked in and its neighbors may (depending on its location in the table) be replaced with the cells you are pasting. To create a new table with the pasted cells, place the insertion point outside of the table. Select Edit > Paste. If you are pasting entire rows or columns into an existing table, the rows or columns are added to the table. If you are pasting an individual cell, the contents of the selected cell are replaced. If you are pasting outside a table, the rows, columns, or cells are used to define a new table. 254 Chapter 8: Presenting Content with Tables To remove cell content but leave the cells intact: 1. Select one or more cells. NO T E 2. Make sure the selection does not consist entirely of complete rows or columns. Select Edit > Clear or press Delete. N OT E If only complete rows or columns are selected when you select Edit > Clear or press Delete, the entire rows or columns—not just their contents—are removed from the table. To delete rows or columns that contain merged cells: 1. Select the row or column. 2. Select Modify > Table > Delete Row or Modify > Table > Delete Column. Nesting tables A nested table is a table inside a cell of another table. You can format a nested table as you would any other table; however, its width is limited by the width of the cell in which it appears. To nest a table within a table cell: 1. Click in a cell of the existing table. 2. Select Insert > Table. The Insert Table dialog box appears. 3. Complete the dialog box. For more information, click the Help button in the dialog box. 4. Click OK. The table appears in the existing table. Nesting tables 255 Sorting tables You can sort the rows of a table based on the contents of a single column. You can also perform a more complicated table sort based on the contents of two columns. You cannot sort tables that contain colspan or rowspan attributes—that is, tables that contain merged cells. For more information, see “Splitting and merging cells” on page 251. To sort a table: 1. Select the table (see “Selecting a table” on page 239) or click in any cell. 2. Select Commands > Sort Table. The Sort Table dialog box appears. 3. Complete the dialog box. For more information, click the Help button in the dialog box. 4. Click OK. 256 Chapter 8: Presenting Content with Tables CHAPTER 9 9 Laying Out Pages in Layout Mode One common method for creating a page layout is to use HTML tables to position elements. Tables can be difficult to use for layout, however, because they were originally created for displaying tabular data, not for laying out web pages. To streamline the process of using tables for page layout, Macromedia Dreamweaver 8 provides Layout mode. In Layout mode, you can design your page using tables as the underlying structure, while avoiding some of the problems that often occur when creating table-based designs using traditional means. NO TE For more information about working with tables in Standard mode, see Chapter 8, “Presenting Content with Tables,” on page 233. Or, as an alternative to using tables in Standard or Layout mode, you can use CSS positioning to lay out pages (see “Inserting div tags for layout” on page 221). This chapter contains these sections: About Layout mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258 Switching from Standard to Layout mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Drawing in Layout mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262 Adding content to a layout cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 Clearing automatically set cell heights. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Resizing and moving layout cells and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Formatting layout cells and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 Setting column width. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 Setting preferences for Layout mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 257 About Layout mode In Layout mode, you use layout cells and tables to lay out your page before adding content. For example, you could draw a cell along the top of your page to hold a header graphic, another cell on the left side of the page to hold a navigation bar, and a third cell on the right to hold content. As you add content, you can move cells around as necessary to adjust your layout. TI P For maximum flexibility, you can draw each cell only when you’re ready to put content into it. This enables you to leave more blank space in the layout table for a longer time, so that you can move or resize cells more easily. Layout tables appear outlined in green on your page; layout cells appear outlined in blue on your page. (To change the default outline colors, see “Setting preferences for Layout mode” on page 273.) When you move the pointer over a table cell, Dreamweaver highlights the cell. (To enable or disable highlighting or to change the highlight color, see “Drawing layout cells and tables” on page 262.) You can lay out your page using several layout cells within one layout table, which is the most common approach to web-page layout, or you can use multiple, separate layout tables for more complex layouts. Using multiple layout tables isolates sections of your layout, so that they aren’t affected by changes in other sections. You can also nest layout tables, by placing a new layout table inside an existing layout table (see “Drawing a nested layout table” on page 264). This structure enables you to simplify the table structure when the rows or column in one part of the layout don’t line up with the rows or columns in another part of the layout. For example, using nested layout tables you could easily create a two-column layout with four rows in the left column and three rows in the right column. 258 Chapter 9: Laying Out Pages in Layout Mode Related topics ■ “Switching from Standard to Layout mode” on page 261 ■ “Drawing in Layout mode” on page 262 About viewing table and cell widths in Layout mode The widths of layout tables and cells (in pixels, or as a percentage of the page width) appear at the top or bottom of the table when the table is selected or when the insertion point is in the table. Beside the widths are arrows for the table header menu and the column header menus. Use the menus for quick access to some common commands. NO T E To disable column widths, along with table tabs and header menus, you must disable all visual aids (View > Visual Aids > Hide All). Sometimes, the width might not appear for a column; you might see any of the following: ■ No width. If you do not see a width for the table or for a column, then that table or column does not have a specified width in the HTML code. To specify a fixed width, see “Making a column autostretch or fixed-width” on page 270. ■ Two numbers. If two numbers appear, then the visual width as it appears in Design view doesn’t match the width specified in the HTML code. This can happen when you resize a table by dragging its lower-right corner or when you add content to a cell that’s larger than its set width. For example, if you set a column’s width to 200 pixels, then add content that stretches the width to 250 pixels, two numbers appear at the top of that column: 200 (the width specified in the code) and in parentheses (250) (the visual width of the column as it’s rendered on your screen). To reconcile the column widths, see “Making column widths in code consistent with visual widths” on page 272. ■ Wavy line. A wavy line appears for columns that are set to autostretch. For information about setting a column to autostretch, see “Making a column autostretch or fixed-width” on page 270. ■ Double bars. Columns that contain spacer images have double bars around the column width. For information about spacer images, see “Using spacer images” on page 271. About Layout mode 259 Related topics ■ “Setting column width” on page 270 Layout table and cells grid lines When you draw a layout cell in a layout table, a light grid of lines appears, extending from the edges of any new layout cell out to the edges of the layout table that contains it. These lines help you align new cells with old cells, and help you visualize the underlying HTML table’s structure. Dreamweaver automatically snaps the edges of new cells into alignment with nearby edges of existing cells. (Layout cells cannot overlap.) Cell edges also automatically snap to the edges of the containing layout table if you draw a cell close to the edge of a table. You can also use the Dreamweaver grid, which is set and doesn’t change based on the placement of cells, to help you lay out your page (see “Using a tracing image” on page 230). Related topics “About Layout mode” on page 258 ■ Fixed column width and autostretch columns A table column in Layout mode can have either a fixed width or a width that automatically expands to fill as much of the browser window as possible (autostretch). Fixed-width columns have a specific numeric width, such as 300 pixels. Dreamweaver displays the column width for each fixed-width column at the top or bottom of the column. Autostretch columns change automatically depending on the browser window’s width. If your layout includes an autostretch column, the layout always fills the entire width of the visitor’s browser window. You can make only one column in a given layout table autostretch. An autostretch column displays a wavy line in the column width area. A common layout is to make the column containing the main content of the page autostretch, which automatically sets all the other columns to fixed width. For example, suppose your layout has a wide image on the left side of the page and a column of text on the right. You might set the left column to a fixed width and make the sidebar area autostretch. When you make a column autostretch, Dreamweaver inserts spacer images in the fixed width columns to ensure that those columns stay as wide as they should be, unless you specify that no spacer image should be used. A spacer image is a transparent image, used to control spacing, that is not visible in the browser window. 260 Chapter 9: Laying Out Pages in Layout Mode Related topics ■ “Making a column autostretch or fixed-width” on page 270 Spacer images A spacer image (also known as a spacer GIF) is a transparent image that’s used to control spacing in autostretch tables. A spacer image consists of a single-pixel transparent GIF image, stretched out to be a specified number of pixels wide. A browser can’t draw a table column narrower than the widest image contained in a cell in that column, so placing a spacer image in a table column requires browsers to keep the column at least as wide as the image. Dreamweaver automatically adds spacer images when you set a column to autostretch, unless you specify that no spacer image should be used. You can manually insert and remove spacer images in each column if you prefer. Columns that contain spacer images have a double bar where the column width appears. You can manually insert and remove spacer images in specific columns or remove all spacer images in the page. Related topics ■ “Using spacer images” on page 271 Switching from Standard to Layout mode Before you can draw layout tables or layout cells, you must switch from Standard mode into Layout mode. When you create tables for layout in Layout mode, but it’s a good idea to switch back to Standard mode before you add content to or edit your tables. NO T E If you create a table in Standard mode, then switch into Layout mode, the resulting layout table might contain empty layout cells. You might need to delete these empty layout cells before you can create new layout cells or move layout cells around. To switch into Layout mode: 1. If you are working in Code view, select View > Design or View > Code and Design. You cannot switch to Layout mode in Code view. 2. Do one of the following: ■ Select View > Table Mode > Layout Mode. ■ In the Layout category of the Insert bar, click the Layout Mode button. A bar labeled Layout Mode appears across the top of the Document window. If there are tables on your page, they appear as layout tables. Switching from Standard to Layout mode 261 To switch out of Layout mode, do one of the following: ■ Click Exit in the bar labeled Layout Mode at the top of the Document window. ■ Select View > Table Mode > Standard Mode. ■ In the Layout category of the Insert bar, click the Standard Mode button. Dreamweaver returns to Standard mode. Drawing in Layout mode Layout mode allows you to draw cells and tables, including tables nested in other tables. The snapping grid helps you to align cells (see “Using a tracing image” on page 230). Drawing layout cells and tables You can draw layout cells and tables on your page in Layout mode. When you draw a layout cell that isn’t inside a layout table, Dreamweaver automatically creates a layout table as a container for the cell. A layout cell cannot exist outside of a layout table. N OT E In Layout mode, you can’t use the Insert Table and Draw Layer tools that you can use in Standard mode. To use those tools, you must first switch to Standard mode. When Dreamweaver automatically creates a layout table, the table initially appears to fill the entire Design view, even if you change the size of your Document window. This full-window default layout table allows you to draw layout cells anywhere in Design view. You can set the table to a specific size by clicking the table border, then dragging the table’s resize handles. When you move the pointer over a layout cell, Dreamweaver highlights it. You can enable or disable highlighting or change the highlight color in preferences. To draw a layout cell: 1. Make sure you are in Layout mode (see “Switching from Standard to Layout mode” on page 261). 2. In the Layout category of the Insert bar, click Draw Layout Cell button. The pointer changes to a cross hair (+). 3. Position the pointer where you want to start the cell on the page, and then drag to create the layout cell. T IP 262 To draw more than one layout cell without having to repeatedly select Draw Layout Cell, Control-drag (Windows) or Command-drag (Macintosh) when you draw the layout cell. As long as you continue to hold Control or Command, you can draw layout cells one after the other. Chapter 9: Laying Out Pages in Layout Mode If you draw the cell close to the edge of the layout table, cell edges automatically snap to the edges of the containing layout table. To temporarily disable snapping, hold down Alt (Windows) or Option (Macintosh) while drawing the cell. The cell appears outlined in blue on your page. To change the outline color, see “Setting preferences for Layout mode” on page 273. To draw a layout table: 1. Make sure you are in Layout mode (see “Switching from Standard to Layout mode” on page 261). 2. In the Layout category of the Insert bar, click the Draw Layout Table button. The pointer changes to a cross hair (+). 3. Position the pointer on the page, then drag to create the layout table. TIP To draw more than one layout table without having to repeatedly select Draw Layout Table, Control-drag (Windows) or Command-drag (Macintosh) when you draw the layout table. As long as you continue to hold Control or Command, you can draw layout tables one after the other. You can create a layout table in an empty area of your page layout, around existing layout cells and tables, or nested inside an existing layout table. If your page contains content, and you want to add a layout table in an empty area of your page layout, you can draw a new layout table only below the bottom of the existing content. TIP If you try to draw a layout table below existing content and the no-draw pointer appears, try resizing the Document window to create more blank space between the bottom of the existing content and the bottom of the window. N OT E Tables cannot overlap each other, but a table can be completely contained inside another table. For more information, see “Drawing a nested layout table” on page 264. The Layout table appears outlined in green on your page. To change the outline color, see “Setting preferences for Layout mode” on page 273. To change highlighting preferences for layout cells: 1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh). The Preferences dialog box appears. 2. Select Highlighting from the category list on the left. Drawing in Layout mode 263 3. Make either of the following changes: ■ To change the highlighting color, click the Mouse-over color box, then select a highlight color using the color picker (or enter the hexadecimal value for the highlight color in the text box). For information about using the color picker, see “Working with colors” on page 350. ■ To enable or disable highlighting, select or deselect the Show checkbox for MouseOver. N OT E 4. These options affect all objects, such as tables and layers, that Dreamweaver highlights when you move the pointer over them. Click OK. Drawing a nested layout table You can draw a layout table inside another layout table, to create a nested table. The cells inside a nested table are isolated from changes made to the outer table; for example, when you change the size of a row or column in the outer table, the cells in the inner table don’t change size. You can insert multiple levels of nested tables. A nested layout table cannot be larger than the table that contains it. N OT E 264 If you draw a layout table in the middle of your page before drawing a layout cell, the table you draw is automatically nested inside a larger table. Chapter 9: Laying Out Pages in Layout Mode To draw a nested layout table: 1. Make sure you are in Layout mode (see “Switching from Standard to Layout mode” on page 261). 2. In the Layout category of the Insert bar, click the Draw Layout Table button. The pointer changes to a cross hair (+). 3. Point to an empty (gray) area in an existing layout table, and then drag to create the nested layout table. NO TE You can’t create a layout table inside a layout cell. You can create a nested layout table only in an empty area of an existing layout table, or around existing cells. To draw a layout table around existing layout cells or tables: 1. Make sure you are in Layout mode (see “Switching from Standard to Layout mode” on page 261). 2. In the Layout category of the Insert bar, click the Draw Layout Table button. The pointer changes to a cross hair (+). 3. Drag to draw a rectangle around a set of existing layout cells or tables. A new nested layout table appears, enclosing the existing cells or tables. TIP To make an existing layout cell fit snugly into one corner of the new nested table, start dragging near the corner of the cell; the new table’s corner snaps to the cell’s corner. You can’t start dragging in the middle of a layout cell, because you can’t create a layout table entirely inside a layout cell. Adding content to a layout cell You can add text, images, and other content to layout cells in Layout mode just as you would add content to table cells in Standard mode. Click in the cell where you want to add content, then type text or insert other content. You can insert content only into a layout cell, not into an empty (gray) area of a layout table, so before you can add content, you must first create layout cells (see “Drawing in Layout mode” on page 262). Adding content to a layout cell 265 To add text to a layout cell: 1. Place the insertion point in the layout cell where you want to add text. 2. Do one of the following: ■ Type text into the cell. The cell automatically expands as you type, if necessary. ■ Paste text copied from another document. For more information, see “Inserting text” on page 381. A layout cell expands automatically when you add content that is wider than the cell. As the cell expands, the column that the cell is in also expands, which might change the sizes of surrounding cells. The column width for that column changes to show the width that appears in the code, followed by the visual width of the column (the width as it appears on your screen) in parentheses. For more information about column widths, see “Setting column width” on page 270. To add an image to a layout cell: 1. Place the insertion point in the layout cell where you want to add the image. 2. Do one of the following: ■ ■ Select Insert > Image. In the Common category of the Insert bar, click the arrow on the Images button, and then select Image. TI P If the Image button is showing (as in the following example) in the Insert bar, you can click the button instead of using the pop-up menu. The Select Image Source dialog box appears. 3. Select an image file. For more information, see “Inserting an image” on page 409. 4. Click OK. The image appears in the layout cell. 266 Chapter 9: Laying Out Pages in Layout Mode Clearing automatically set cell heights When you create a layout cell, Dreamweaver automatically specifies a height for the cell, to make the cell display at the height you drew even though the cell is empty. After you insert content into the cell, you might no longer need the height to be specified, so you can remove the explicit cell heights from the table. To clear cell heights, do one of the following: ■ Click the table header menu, then select Clear All Heights. ■ Select a layout table by clicking the tab at the top of the table, then click the Clear Row Heights button in the Property inspector (Window > Properties). Dreamweaver clears all the heights specified in the table. Some of the table cells might shrink vertically. Resizing and moving layout cells and tables To adjust your page layout, you can move and resize layout cells and nested layout tables. (The outermost layout table can only be resized.) N OT E To use the Dreamweaver grid as a guide while you move or resize your cells and tables, see “Using a tracing image” on page 230. Resizing and moving layout cells You can resize or move layout cells, but they cannot overlap. You cannot move or resize a cell to make it cross the boundaries of the layout table that contains it. A layout cell cannot be made smaller than its contents. For information on how to resize or move layout tables, see “Resizing and moving layout tables” on page 268. Resizing and moving layout cells and tables 267 To resize a layout cell: 1. Select a cell by clicking an edge of the cell or by Control-clicking (Windows) or Command-clicking (Macintosh) anywhere in the cell. Selection handles appear around the cell. 2. Drag a selection handle to resize the cell. The cell edges automatically snap to align with other cells’ edges. To move a layout cell: 1. Select a cell by clicking an edge of the cell or by Control-clicking (Windows) or Command-clicking (Macintosh) anywhere in the cell. Selection handles appear around the cell. 2. Do one of the following: ■ Drag the cell to another location within its layout table. ■ Press the arrow keys to move the cell 1 pixel at a time. TIP Hold down Shift while pressing an arrow key to move the cell 10 pixels at a time. Resizing and moving layout tables A layout table cannot be resized to be smaller than the smallest rectangle containing all of its cells. A layout table also cannot be resized so that it overlaps other tables or cells. To resize or move layout cells, see “Resizing and moving layout cells” on page 267. To resize a layout table: 1. Select a table by clicking the tab at the top of the table. Selection handles appear around the table. 2. Drag the selection handles to resize the table. The table edges automatically snap to align with the edges of other cells and tables. 268 Chapter 9: Laying Out Pages in Layout Mode To move a layout table: 1. Select a table by clicking the tab at the top of the table. Selection handles appear around the table. NO T E 2. You can move a layout table only if it’s nested inside another layout table. Do one of the following: ■ Drag the table to another location on the page. ■ Press the arrow keys to move the table 1 pixel at a time. TIP Hold down Shift while pressing an arrow key to move the table 10 pixels at a time. Formatting layout cells and tables You can change the appearance of any layout cell or table by using the Property inspector. Formatting layout cells You can set various attributes of a layout cell in the Property inspector, including width and height, background color, and alignment of the cell’s contents. To format a layout cell in the Property inspector: 1. Select a cell by clicking an edge of the cell or by Control-clicking (Windows) or Command-clicking (Macintosh) anywhere in the cell. 2. Open the Property inspector (Window > Properties) if it isn’t already open. 3. Change the cell’s formatting by setting properties. For more information, click the Help button in the Property inspector. Formatting layout cells and tables 269 Formatting layout tables You can set various attributes of a layout table in the Property inspector, including width, height, padding, and spacing. To format a layout table: 1. Select a table by clicking the tab at the top of the table. 2. Open the Property inspector (Window > Properties) if it isn’t already open. 3. Change the table’s formatting by setting properties. For more information, click the Help button in the Property inspector. Setting column width You can set a column to a specific width or make it stretch to fill as much of a browser window as possible. You can also specify a minimum width for a column using a spacer image. Sometimes the column widths width set in the HTML code do not match their apparent widths on the screen. When this happens, you can make the widths consistent. Making a column autostretch or fixed-width A column in a table can be either fixed-width or autostretch. For more information, see “Fixed column width and autostretch columns” on page 260. Making a column autostretch before your layout is complete might have unexpected effects on table layout. To prevent columns from growing unexpectedly wider or narrower, create your complete layout before making a column autostretch, and use spacer images when making a column autostretch. (However, if each column contains other content that will keep the column at the desired width, you don’t need spacer images.) To make a column autostretch: 1. 270 Do one of the following: Chapter 9: Laying Out Pages in Layout Mode ■ ■ Click the column header menu, then select Make Column Autostretch. Select a cell in the column by clicking an edge of the cell, then click Autostretch in the Property inspector. N OT E You can make only one column in a given table autostretch. If you have not set a spacer image for this site, the Choose Spacer Image dialog box appears. 2. If the Choose Spacer Image dialog box appears, select an option, then click OK. For more information, click the Help button in the dialog box. A wavy line appears at the top or bottom of the autostretch column. Double bars appear at the tops or bottoms of columns that contain spacer images. To set a column to a fixed width, do one of the following: ■ Click the column header menu, and then select Make Column Fixed Width. Make Column Fixed Width specifies a width for the column (in the code) that matches the current visual width of the column. ■ Select a cell in the column by clicking an edge of the cell, then click Fixed and type a numeric value in the Property inspector. If you enter a numeric value that is less than the width of the column’s content, Dreamweaver automatically sets the width to match the width of the content. The width of the column appears at the top or bottom of the column. Related topics “Making column widths in code consistent with visual widths” on page 272 ■ Using spacer images To require a column to be a certain minimum width, you can insert a spacer image into that column. For more information, see “Spacer images” on page 261. You can remove spacer images from a single column or from the entire table. The first time you insert a spacer image, you set up a spacer image for the site. You can set preferences for spacer images (see “Setting preferences for Layout mode” on page 273). Setting column width 271 To insert a spacer image into a column: 1. Click the column header menu, then select Add Spacer Image. If you have not set a spacer image for this site, the Choose Spacer Image dialog box appears. 2. If the Choose Spacer Image dialog box appears, select an option, then click OK. For more information, click the Help button in the dialog box. Dreamweaver inserts the spacer image into the column. The image is not visible, but the column might shift slightly and a double bar appears at the top or bottom of the column to indicate that it contains a spacer image. To remove a spacer image from a single column: ■ Click the column header menu, then select Remove Spacer Image. Dreamweaver removes the spacer image. The column might shift. To remove all spacer images from a table, do one of the following: ■ Click the table header menu, then select Remove All Spacer Images. ■ Select the table, then click the Remove All Spacers button in the Property inspector (Window > Properties). The layout of your whole table might shift. If there is no content in some columns, the columns might disappear completely from the Design view. Making column widths in code consistent with visual widths If you see two numbers for a column’s width, then the column width set in the HTML code does not match the column’s apparent width on the screen. You can make the width specified in the code match the visual width. For more information, see “About viewing table and cell widths in Layout mode” on page 259. 272 Chapter 9: Laying Out Pages in Layout Mode To make widths consistent: 1. Click in a cell. 2. Do one of the following: ■ ■ Click the table header menu, and then select Make All Widths Consistent. Select the table, then click the Remove All Spacers button in the Property inspector (Window > Properties). Dreamweaver resets the width specified in the code to match the visual width. Related topics ■ “Making a column autostretch or fixed-width” on page 270 ■ “Using spacer images” on page 271 Setting preferences for Layout mode You can specify preferences for spacer image files and for the colors that Dreamweaver uses to draw layout tables and layout cells. To set Layout mode preferences: 1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh). The Preferences dialog box appears. 2. Select Layout Mode from the category list on the left. 3. Make changes as necessary. For more information, click the Help button in the dialog box. 4. Click OK. Setting preferences for Layout mode 273 274 Chapter 9: Laying Out Pages in Layout Mode 10 CHAPTER 10 Using Frames Frames provide a way to divide a browser window into multiple regions, each of which can display a different HTML document. In the most common use of frames, one frame displays a document containing navigation controls, while another frame displays a document with content. N O TE A detailed discussion of all the ways to design and use frames, and the code required for hand-coding them, is beyond the scope of this chapter. If you need detailed information about the code used in advanced frame layouts, see a book about frames and framesets. This chapter contains the following sections: About frames and framesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Working with framesets in the Document window . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Creating frames and framesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Selecting frames and framesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284 Opening a document in a frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Saving frame and frameset files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Viewing and setting frame properties and attributes . . . . . . . . . . . . . . . . . . . . . . . . .288 Viewing and setting frameset properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Controlling frame content with links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Handling browsers that can’t display frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292 Using JavaScript behaviors with frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293 275 About frames and framesets A frame is a region in a browser window that can display an HTML document independent of what’s being displayed in the rest of the browser window. A frameset is an HTML file that defines the layout and properties of a set of frames, including the number of frames, the size and placement of the frames, and the URL of the page that initially appears in each frame. The frameset file itself doesn’t contain HTML content that displays in a browser, except in the noframes section (see “Handling browsers that can’t display frames” on page 292); the frameset file simply provides information to the browser about how a set of frames should look and what documents should appear in them. Related topics ■ “Working with framesets in the Document window” on page 280 ■ “Creating frames and framesets” on page 281 Understanding how frames and framesets work A frame is a region in a browser window that can display an HTML document independent of what’s being displayed in the rest of the browser window. A frameset is an HTML file that defines the layout and properties of a set of frames. To view a set of frames in a browser, enter the URL of the frameset file; the browser then opens the relevant documents to display in the frames. The frameset file for a site is often named index.html, so that it displays by default if a visitor doesn’t specify a filename. 276 Chapter 10: Using Frames The following example shows a frame layout consisting of three frames: one narrow frame on the side that contains a navigation bar, one frame that runs along the top, containing the logo and title of the website, and one large frame that takes up the rest of the page and contains the main content. Each of these frames displays a separate HTML document. In this example, the document displayed in the top frame never changes as the visitor navigates the site. The side frame navigation bar contains links; clicking one of these links changes the content of the main content frame, but the contents of the side frame itself remain static. The main content frame on the right displays the appropriate document for whichever link the visitor clicks on the left. Note that a frame is not a file. It’s easy to think of the document that currently appears in a frame as an integral part of the frame, but the document isn’t actually part of the frame. The frame is a container that holds the document—any frame can display any document. NO T E The word page can be used loosely to refer either to a single HTML document or to the entire contents of a browser window at a given moment, even if several HTML documents appear at once. The phrase “a page that uses frames,” for example, usually refers to a set of frames and the documents that initially appear in those frames. A site that appears in a browser as a single page comprising three frames actually consists of at least four separate HTML documents: the frameset file, plus the three documents containing the content that initially appears in the frames. When you design a page using framesets in Dreamweaver, you must save each of these four files in order for the page to work properly in the browser. Related topics ■ “Understanding nested framesets” on page 279 About frames and framesets 277 Deciding whether to use frames The most common use of frames is for navigation. A set of frames often includes one frame containing a navigation bar and another frame to display the main content pages. However, designing with frames can be confusing, and in many cases you can create a web page without frames that accomplishes many of the same goals as a set of frames. For example, if you want a navigation bar to appear on the left side of your page, you can either replace your page with a set of frames, or just include the navigation bar on every page in your site. (Dreamweaver helps you create multiple pages that use the same layout; see “About Dreamweaver templates” on page 296.) The following image shows a page design with a framelike layout that doesn’t use frames. Many professional web designers prefer not to use frames, and many people who browse the web dislike frames. In most cases this dislike is due to having encountered sites that use frames poorly or unnecessarily (such as a frameset that reloads the contents of the navigation frames every time the visitor clicks a navigation button). When frames are used well (such as when they’re used to keep navigation controls static in one frame while allowing the contents of another frame to change), they can be very useful for some sites. Not all browsers provide good frame support, and frames may be difficult for visitors with disabilities to navigate, so if you do use frames, always provide a noframes section in your frameset, for visitors who can’t view them (see “Handling browsers that can’t display frames” on page 292). You may also want to provide an explicit link to a frameless version of the site, for visitors whose browsers support frames but who don’t like using frames. Advantages to using frames include the following: ■ 278 A visitor’s browser doesn’t need to reload the navigation-related graphics for every page. Chapter 10: Using Frames ■ Each frame has its own scroll bar (if the content is too large to fit in a window), so a visitor can scroll the frames independently. For example, a visitor who scrolls down to the bottom of a long page of content in a frame doesn’t need to scroll back up to the top to use the navigation bar if the navigation bar is in a different frame. Disadvantages to using frames include the following: ■ Precise graphical alignment of elements in different frames can be difficult. ■ Testing the navigation can be time-consuming. ■ The URLs of the individual framed pages don’t appear in browsers, so it can be difficult for a visitor to bookmark a specific page (unless you provide server code that enables them to load a framed version of a particular page). Related topics ■ “Understanding how frames and framesets work” on page 276 ■ “Handling browsers that can’t display frames” on page 292 Understanding nested framesets A frameset inside another frameset is called a nested frameset. A single frameset file can contain multiple nested framesets. Most web pages that use frames are actually using nested frames, and most of the predefined framesets in Dreamweaver also use nesting. Any set of frames in which there are different numbers of frames in different rows or columns requires a nested frameset. For example, the most common frame layout has one frame in the top row (where the company’s logo appears) and two frames in the bottom row (a navigation frame and a content frame). This layout requires a nested frameset: a two-row frameset, with a two-column frameset nested in the second row. Main frameset Menu frame and content frame are nested within the main frameset. About frames and framesets 279 Dreamweaver takes care of nesting framesets as needed; if you use the frame-splitting tools in Dreamweaver, you don’t need to worry about the details of which frames are nested and which aren’t. For more information about the frame-splitting tools, see “Designing a frameset” on page 283. There are two ways to nest framesets in HTML: the inner frameset can be defined either in the same file as the outer frameset, or in a separate file of its own. Each predefined frameset in Dreamweaver defines all of its framesets in the same file. Both kinds of nesting produce the same visual results; it’s not easy to tell, without looking at the code, which kind of nesting is being used. The most likely situation in which an external frameset file would be used in Dreamweaver is when you use the Open in Frame command to open a frameset file inside a frame; doing this may result in problems with setting targets for links. It’s generally simplest to keep all framesets defined in a single file. Related topics ■ “Understanding how frames and framesets work” on page 276 ■ “Deciding whether to use frames” on page 278 Working with framesets in the Document window Dreamweaver enables you to view and edit all of the documents associated with a set of frames in one Document window. This approach enables you to see approximately how the framed pages will appear in a browser as you edit them. However, some aspects of this approach can be confusing until you get used to them. In particular, remember that each frame displays a separate HTML document. Even if the documents are empty, you must save them all before you can preview them (because the frameset can be accurately previewed only if it contains the URL of a document to display in each frame). To ensure that your frameset appears correctly in browsers: 1. Create your frameset and specify a document to appear in each frame (see “Creating frames and framesets” on page 281). 2. Save every file that’s going to appear in a frame (see “Saving frame and frameset files” on page 287). Remember that each frame displays a separate HTML document, and you must save each document, along with the frameset file. 280 Chapter 10: Using Frames 3. Set the properties for each frame and for the frameset (see “Viewing and setting frame properties and attributes” on page 288 and “Viewing and setting frameset properties” on page 290). 4. Make sure to set the Target property in the Property inspector for all your links so that the linked content appears in the correct area (see “Controlling frame content with links” on page 291). This includes naming each frame, setting scrolling and non-scrolling options, and more. Creating frames and framesets There are two ways to create a frameset in Dreamweaver: You can select from several predefined framesets or you can design it yourself. Choosing a predefined frameset automatically sets up all the framesets and frames needed to create the layout and is the easiest way to create a frames-based layout quickly. You can insert a predefined frameset only in the Document window’s Design view. Using a predefined frameset Predefined framesets make it easy for you to select the type of frameset you want to create. If you prefer to design your own frameset, see “Designing a frameset” on page 283. There are two ways to create a predefined frameset: ■ The Insert bar enables you to create a frameset and display the current document in one of the new frames. ■ The New Document dialog creates a new empty frameset. To create a predefined frameset and display an existing document in a frame: 1. Place the insertion point in a document. 2. Do one of the following: ■ ■ Select a predefined frameset from the Insert > HTML > Frames submenu. In the Layout category of the Insert bar, click the drop down arrow on the Frames button, then select a predefined frameset. Creating frames and framesets 281 The frameset icons provide a visual representation of each frameset as applied to the current document. The blue area of a frameset icon represents the current document, and the white areas represent frames that will display other documents. NO TE When you apply a frameset, Dreamweaver automatically sets up the frameset to display the current document (the document in which the insertion point is located) in one of the frames. The Frame Tag Accessibility Attributes dialog box appears, if you have set up Dreamweaver to prompt you for frame accessibility attributes (see “Optimizing the workspace for accessible page design” on page 69). 3. If the Frame Tag Accessibility Attributes dialog box appears, complete the dialog box for each frame, then click OK. For more information, click the Help button in the dialog box. NO T E If you click Cancel, the frameset appears in the document, but Dreamweaver does not associate accessibility tags or attributes with it. To edit frame tag accessibility attributes, see “Viewing and setting frame properties and attributes” on page 288. To create a new empty predefined frameset: 1. Select File > New. 2. In the New Document dialog box, select the Framesets category. 3. Select a frameset from the Framesets list. 282 Chapter 10: Using Frames 4. Click Create. The frameset appears in your document and the Frame Tag Accessibility Attributes dialog box appears, if you have activated the dialog box in Preferences (see “Optimizing the workspace for accessible page design” on page 69). 5. If the Frame Tag Accessibility Attributes dialog box appears, complete the dialog box for each frame, then click OK. For more information, click the Help button in the dialog box. NO T E If you press Cancel, the frameset appears in the document, but Dreamweaver does not associate accessibility tags or attributes with it. To edit frame tag accessibility attributes, see “Viewing and setting frame properties and attributes” on page 288. Designing a frameset You can design your own frameset in Dreamweaver by adding “splitters” to the window. If you prefer to use a predefined frameset, see “Using a predefined frameset” on page 281. TI P Before creating a frameset or working with frames, make the frame borders visible in the Document window’s Design view by selecting View >Visual Aids > Frame Borders. To create a frameset: ■ Select Modify > Frameset, then select a splitting item (such as Split Frame Left or Split Frame Right) from the submenu. Dreamweaver splits the window into frames. If you had an existing document open, it appears in one of the frames. To split a frame into smaller frames, do one of the following: ■ To split the frame where the insertion point is, select a splitting item from the Modify > Frameset submenu. ■ To split a frame or set of frames vertically or horizontally, drag a frame border from the edge of the Design view into the middle of the Design view. ■ To split a frame using a frame border that isn’t at the edge of the Design view, Alt-drag (Windows) or Option-drag (Macintosh) a frame border. Creating frames and framesets 283 ■ To divide a frame into four frames, drag a frame border from one of the corners of the Design view into the middle of a frame. TIP To create three frames, start with two frames, then split one of them. It’s not easy to merge two adjacent frames without editing the frameset code, so turning four frames into three frames is harder than turning two frames into three frames. To delete a frame: ■ Drag a frame border off the page or to a border of the parent frame. If there’s unsaved content in a document in a frame that’s being removed, Dreamweaver prompts you to save the document. NO TE You can’t remove a frameset entirely by dragging borders. To remove a frameset, close the Document window that displays it. If the frameset file has been saved, delete the file. To resize a frame, do one of the following: ■ To set approximate sizes for frames, drag frame borders in the Document window’s Design view. ■ To specify exact sizes, and to specify how much space the browser allocates to a row or column of frames when the browser window size doesn’t allow the frames to display at full size, use the Property inspector (see “Viewing and setting frameset properties” on page 290). Selecting frames and framesets To make changes to the properties of a frame or frameset, begin by selecting the frame or frameset you want to change. You can select a frame or frameset either in the Document window or by using the Frames panel. 284 Chapter 10: Using Frames Selecting frames and framesets in the Frames panel The Frames panel provides a visual representation of the frames within a frameset. It shows the hierarchy of the frameset structure in a way that may not be apparent in the Document window. In the Frames panel, a very thick border surrounds each frameset; each frame is surrounded by a thin gray line and is identified by a frame name. To display the Frames panel: ■ Select Window > Frames. To select a frame in the Frames panel: ■ Click the frame in the Frames panel. A selection outline appears around the frame in both the Frames panel and the Document window’s Design view. To select a frameset in the Frames panel: ■ Click the border that surrounds the frameset in the Frames panel. A selection outline appears around the frameset in both the Frames panel and the Document window’s Design view. Related topics ■ “Viewing and setting frame properties and attributes” on page 288 ■ “Viewing and setting frameset properties” on page 290 Selecting frames and framesets 285 Selecting frames and framesets in the Document window In the Document window’s Design view, when a frame is selected, its borders are outlined with a dotted line; when a frameset is selected, all the borders of the frames within the frameset are outlined with a light dotted line. NO T E Placing the insertion point in a document that’s displayed in a frame is not the same as selecting a frame. There are various operations (such as setting frame properties) for which you must select a frame. To select a frame in the Document window: ■ Alt-click (Windows) or Option-Shift-click (Macintosh) inside a frame in Design view. A selection outline appears around the frame. To select a frameset in the Document window: ■ Click one of the frameset’s internal frame borders in Design view. (Frame borders must be visible to do this; select View >Visual Aids > Frame Borders to make frame borders visible if they aren’t.) A selection outline appears around the frameset. N OT E It’s generally easier to select framesets in the Frames panel than in the Document window. For more information, see “Selecting frames and framesets in the Frames panel” on page 285. To select a different frame or frameset, do one of the following: ■ To select the next or previous frame or frameset at the same hierarchical level as the current selection, press Alt+Left Arrow or Alt+Right Arrow (Windows) or Command+Left Arrow or Command+Right Arrow (Macintosh). Using these keys, you can cycle through frames and framesets in the order in which they’re defined in the frameset file. ■ To select the parent frameset (the frameset that contains the current selection), press Alt+Up Arrow (Windows) or Command+Up Arrow (Macintosh). ■ To select the first child frame or frameset of the currently selected frameset (that is, first in the order in which they’re defined in the frameset file), press Alt+Down Arrow (Windows) or Command+Down Arrow (Macintosh). 286 Chapter 10: Using Frames Related topics ■ “Selecting frames and framesets in the Frames panel” on page 285 ■ “Viewing and setting frame properties and attributes” on page 288 ■ “Viewing and setting frameset properties” on page 290 Opening a document in a frame You can specify the initial content of a frame by either inserting new content into an empty document in a frame, or opening an existing document in a frame. To open an existing document in a frame: 1. Place the insertion point in a frame. 2. Select File > Open in Frame. 3. Select a document to open in the frame, then click OK (Windows) or Choose (Macintosh). The document appears in the frame. 4. (Optional) To make this document the default document to display in the frame when the frameset is opened in a browser, save the frameset. Saving frame and frameset files Before you can preview a frameset in a browser, you must save the frameset file and all of the documents that will display in the frames. You can save each frameset file and framed document individually, or you can save the frameset file and all documents appearing in frames at once. N OT E When you use visual tools in Dreamweaver to create a set of frames, each new document that appears in a frame is given a default filename. For example, the first frameset file is named UntitledFrameset-1, while the first document in a frame is named UntitledFrame-1. To save a frameset file: 1. Select the frameset in the Frames panel or the Document window (see “Selecting frames and framesets” on page 284). 2. Do one of the following: ■ To save the frameset file, select File > Save Frameset. ■ To save the frameset file as a new file, select File > Save Frameset As. If the frameset file has not previously been saved, these two commands are equivalent. Saving frame and frameset files 287 To save a document that appears in a frame: ■ Click in the frame, then select File > Save Frame or File > Save Frame As. To save all files associated with a set of frames: ■ Select File > Save All Frames. This saves all open documents in the frameset, including the frameset file and all framed documents. If the frameset file has not yet been saved, a heavy border appears around the frameset in the Design view, and a dialog box enables you to select a filename. For each frame that hasn’t yet been saved, a heavy border appears around the frame and a dialog box enables you to select a filename. N OT E If you used File > Open in Frame to open a document in a frame, then when you save the frameset, the document you opened in the frame becomes the default document to be displayed in that frame. If you don’t want that document to be the default, don’t save the frameset file. Viewing and setting frame properties and attributes Use the Property inspector to view and set most frame properties. You may also want to set some frame attributes, such as the title attribute (which is not the same as the name attribute), to improve accessibility. You can enable the accessibility authoring option for frames to set attributes when you create frames (see “Optimizing the workspace for accessible page design” on page 69), or you can set attributes after you insert a frame. To edit accessibility attributes for a frame, you can use the Tag inspector to edit the HTML code directly. 288 Chapter 10: Using Frames To set properties for a frameset, see “Viewing and setting frameset properties” on page 290. To view or set frame properties: 1. Select a frame by doing one of the following: ■ ■ Alt-click (Windows) or Shift-Option-click (Macintosh) a frame in the Document window’s Design view. Click a frame in the Frames panel (Window > Frames). 2. In the Property inspector (Window > Properties), click the expander arrow in the lowerright corner to see all of the frame properties. 3. Make changes as necessary. For more information, click the Help button in the Property inspector. TIP To change the background color of a frame, set the background color of the document in the frame in page properties. To set accessibility values for a frame: 1. In the Frames panel (Window > Frames), select a frame by placing the insertion point in one of the frames. 2. Select Modify > Edit Tag. The Tag editor appears. 3. Select Style Sheet/Accessibility from the category list on the left. 4. Enter values as desired. 5. Click OK. To edit accessibility values for a frame: 1. Display Code view or Code and Design views for your document, if you’re currently in Design view. 2. In the Frames panel (Window > Frames), select a frame by placing the insertion point in one of the frames. Dreamweaver highlights the frame tag in the code. 3. Right-click (Windows) or Control-click (Macintosh) in the code, then select Edit Tag. The tag editor appears. Viewing and setting frame properties and attributes 289 4. Make changes as necessary. 5. Click OK. To change the background color of a document in a frame: 1. Place the insertion point in the frame. 2. Select Modify > Page Properties. The Page Properties dialog box appears. 3. Click the Background color pop-up menu, then select a color. 4. Click OK. Related topics ■ “Creating frames and framesets” on page 281 Viewing and setting frameset properties Use the Property inspector to view and set most frameset properties. To set properties for a frame, see “Viewing and setting frame properties and attributes” on page 288. To view or set frameset properties: 1. Select a frameset by doing one of the following: ■ ■ Click a border between two frames in the frameset in the Document window’s Design view. Click the border that surrounds a frameset in the Frames panel (Window > Frames). 2. In the Property inspector (Window > Properties), click the expander arrow in the lowerright corner to see all of the frameset properties. 3. Make changes as necessary. For more information, click the Help button in the Property inspector. 290 Chapter 10: Using Frames To set a title for a frameset document: 1. Select a frameset by doing one of the following: ■ ■ 2. Click a border between two frames in the frameset in the Document window’s Design view. Click the border that surrounds a frameset in the Frames panel (Window > Frames). In the Title field of the Document toolbar, type a name for the frameset document. When a visitor views the frameset in a browser, the title appears in the browser’s title bar. Related topics ■ “Creating frames and framesets” on page 281 Controlling frame content with links To use a link in one frame to open a document in another frame, you must set a target for the link. The target attribute of a link specifies the frame or window in which the linked content opens. For example, if your navigation bar is in the left frame, and you want the linked material to appear in the main content frame on the right, you must specify the name of the main content frame as the target for each of the navigation bar links. When a visitor clicks a navigation link, the specified content opens in the main frame. To target a frame: 1. In Design view, select text or an object. 2. In the Link field in the Property inspector (Window > Properties), do one of the following: 3. ■ Click the folder icon, then select the file to link to. ■ Drag the Point to File icon to the Files panel to select the file to link to. In the Target pop-up menu in the Property inspector, select the frame or window in which the linked document should appear: ■ ■ _blank opens the linked document in a new browser window, leaving the current window untouched. _parent opens the linked document in the parent frameset of the frame the link appears in, replacing the entire frameset. ■ _self ■ _top opens the link in the current frame, replacing the content in that frame. opens the linked document in the current browser window, replacing all frames. Controlling frame content with links 291 Frame names also appear in this menu. Select a named frame to open the linked document in that frame. N OT E Frame names appear only when you’re editing a document within a frameset. When you edit a document in its own Document window, frame names do not appear in the Target pop-up menu. If you’re editing a document outside of the frameset, you can type the target frame’s name in the Target text box. TIP If you’re linking to a page outside of your site, always use target="_top" or target="_blank" to ensure that the page doesn’t appear to be part of your site. Handling browsers that can’t display frames Dreamweaver lets you specify content to display in text-based browsers and in older graphical browsers that do not support frames. This content is stored in the frameset file, wrapped in a noframes tag. When a browser that doesn’t support frames loads the frameset file, the browser displays only the content enclosed by the noframes tag. NO TE Content in the noframes area should be more than just a note saying “You should upgrade to a browser that can handle frames.” Some people have good reasons for using a system that doesn’t allow them to view frames. Try to make your content as accessible as possible to such visitors. To provide content for browsers that don’t support frames: 1. Select Modify > Frameset > Edit NoFrames Content. Dreamweaver clears the Design view, and the words “NoFrames Content” appear at the top of the Design view. 2. To create the NoFrames content, do one of the following: ■ ■ 3. In the Document window, type or insert the content just as you would for an ordinary document. Select Window > Code Inspector, place the insertion point between the body tags that appear inside the noframes tags, then type the HTML code for the content. Select Modify > Frameset > Edit NoFrames Content again to return to the normal view of the frameset document. 292 Chapter 10: Using Frames Using JavaScript behaviors with frames There are several JavaScript behaviors and navigation-related commands that are particularly appropriate for use with frames: Set Text of Frame replaces the content and formatting of a given frame with the content you specify. The content can include any valid HTML. Use this action to dynamically display information in a frame. (See “Set Text of Frame” on page 515.) Go to URL opens a new page in the current window or in the specified frame. This action is particularly useful for changing the contents of two or more frames with one click. (See “Go to URL” on page 509.) Insert Navigation Bar adds a navigation bar to a page; after inserting a navigation bar, you can attach behaviors to its images and set which image displays based on a visitor’s actions. For example, you may want to show a button image in its Up or Down state to let a visitor know which page of a site is being viewed. (See “Inserting a navigation bar” on page 444.) Insert Jump Menu sets up a menu list of links that open files in a browser window when clicked. You can also target a particular window or frame in which the document opens. (See “Inserting jump menus” on page 441.) Using JavaScript behaviors with frames 293 294 Chapter 10: Using Frames 11 CHAPTER 11 Managing Templates A Macromedia Dreamweaver 8 template is a special type of document that you use to design a “fixed” page layout; you can then create documents based on the template that inherit the page layout of the template. As you design a template, you specify which areas of documents based on that template users can edit. N O TE Templates enable you to control a large design area and reuse complete layouts. If you want to reuse individual design elements, such as a site’s copyright information or a logo, you can create library items. For more information, see Chapter 5, “Managing Site Assets and Libraries,” on page 159. The chapter contains the following sections: About Dreamweaver templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296 Creating a Dreamweaver template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 Creating templates for a Contribute site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Creating editable regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 Creating repeating regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 Using optional regions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 Defining editable tag attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 Creating a nested template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 Editing and updating templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 Managing templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 Exporting and importing template XML content . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 Exporting a site without template markup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332 Applying or removing a template from an existing document . . . . . . . . . . . . . . . . .332 Editing content in a template-based document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334 295 About Dreamweaver templates A template author designs a “fixed” page layout in a template. The author then creates regions in the template that are editable in documents based on that template; if the author does not define a region as editable, then template users cannot edit content in that area. Templates enable template authors to control which page elements template users—such as writers, graphic artists, or other web developers—can edit. There are several types of template regions the template author can include in a document. One of the most powerful uses of templates is the ability to update multiple pages at once. A document that is created from a template remains connected to that template (unless you detach the document later). You can modify a template and immediately update the design in all documents based on it. Related topics “Creating a Dreamweaver template” on page 308 ■ Types of template regions Dreamweaver automatically locks most regions of a document when you save the document as a template. As a template author you specify which regions of a template-based document will be editable by inserting editable regions or editable parameters in the template. As you create the template, you can make changes to both editable and locked regions. In a document based on the template, however, a template user can make changes only in the editable regions; the locked regions can’t be modified. There are four types of template regions: An editable region is an unlocked region in a template-based document—a section a template user can edit. A template author can specify any area of a template as editable. For a template to be effective, it should contain at least one editable region; otherwise, pages based on the template can’t be edited. For information about inserting an editable region, see “Inserting an editable region” on page 315. A repeating region is a section of the layout in a document that is set to repeat. For example, you can set a table row to repeat. Usually repeating sections are editable so that the template user can edit the content in the repeating element, while the design itself is under the control of the template author. The template user uses repeat region control options to add or delete copies of the repeated region in a document based on the template as necessary. 296 Chapter 11: Managing Templates There are two types of repeating regions you can insert in a template: repeating region and repeating table. For information about inserting a repeating region in a template, see “Creating a repeating region in a template” on page 318. For information about creating a repeating table, see “Inserting a repeating table” on page 319. For information about working with a repeating region in a template-based page, see “Adding, deleting, and changing the order of a repeating region entry” on page 336. An optional region is a section of a template that you specify as optional, to hold content such as optional text or an image that may or may not appear in a document based on the template. In the template-based page, the template user usually controls whether the content is displayed. For information about setting optional regions in a template, see “Inserting an optional region” on page 321. For information about editing optional regions in a templatebased page, see “Modifying template properties” on page 334. An editable tag attribute lets you unlock a tag attribute in a template, so the attribute can be edited in a template-based page. For example, you can “lock” which image appears in the document but let the template user set the alignment to left, right, or center. For information about setting editable tag attributes, see “Specifying editable tag attributes in a template” on page 323. For information about editing the tags in a template-based page, see “Modifying template properties” on page 334. Related topics “Creating editable regions” on page 314 ■ ■ “Creating repeating regions” on page 317 ■ “Using optional regions” on page 320 ■ “Defining editable tag attributes” on page 323 Templates and template-based documents in Design and Code views You can view templates and template-based documents in Design or Code view. Viewing templates in Design view In templates, editable regions appear in the Document window’s Design view surrounded by rectangular outlines in a preset highlight color. A small tab appears at the upper-left corner of each region, showing the name of the region. NO T E For information about setting highlighting color preferences, see “Setting highlighting preferences for template regions” on page 311. About Dreamweaver templates 297 You can identify a template file by looking at the title bar in the Document window. The title bar for a template file contains the word <