Chapter 13. Making Life Easier: Using Templates, Libraries, and Snippets


The first thing you do when you begin a site in Dreamweaver is define a site root folder, as discussed in Chapter 2. You tell Dreamweaver where you're keeping all your site files. Dreamweaver rewards you for sharing the information by making all sorts of cool site-wide tools available to speed up your workflow and make your life easier. In seconds, Dreamweaver's site management tools can make changes to every file in your local site root folderchanges that would take you much longer done one file at a time.

We'll cover two of those timesaving whole-site tools, templates and libraries, in this chapter. In addition, you'll learn how to create timesaving bits of reusable code called snippets. You access templates and Library items from the Assets panel. Snippets have a separate panel.

Before getting into the details, some brief definitions are in order. Templates are like master page designs. They create a uniform page design for a site, while allowing certain material on each page to be customized for individual pages. Library items are not full pages, but reusable objects with text, code, images, or other elements that you insert in documents. For example, you can create a navigation bar as a Library item. Updating either a template or a Library item results in the automatic updating of any page in the entire site that is attached to the template or library. Snippets are custom-built code samples that you find useful and save for quick insertion. Changing a snippet doesn't have any site-wide effects.

They Can't Break Your Sites!

Pages made from templates are perfect for use in organizations that want relatively unskilled people to be able to make changes and updates to sites without the possibility of accidentally "breaking" the site. In fact, Macromedia has a program, Macromedia Contribute, that works hand-in-hand with sites built using Dreamweaver templates to allow people to add content and make changes to Web sites without being able to mess up the site's design elements. With Contribute, the site designer can assign site contributors to user roles , which specify the editing tasks the user is allowed. For example, you can have a user who can add and change text to a page, but can only style that text with CSS styles you supply, or you can prevent the user from styling text at all. You can also require that users send their changed pages to a supervisor for review before making the page live on the site. Many other permissions and restrictions are possible if people who work on your site use Contribute.

You'll find more information about using Dreamweaver to work with Contribute in Chapter 14, and if you want to know more about Contribute itself, we invite you to pick up Macromedia Contribute 3 for Windows and Macintosh: Visual QuickStart Guide , by Tom Negrino, also from Peachpit Press.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net