Library Basics

Imagine this situation: You manage a relatively large Web site consisting of thousands of Web pages. At the bottom of each page is a simple copyright notice: “Copyright MyBigCompany. We reserve all rights—national, international, commercial, noncommercial, and mineral—to the content contained on these pages.”

Each time you add another page to the site, you could retype the copyright message, but this approach invites both typographic errors and carpal tunnel syndrome. And if you must format this text too, then you’re in for quite a bit of work.

Fortunately, Dreamweaver’s Library can turn any selection in the document window (a paragraph, an image, a table) into a reusable chunk of HTML that, later, you can easily drop into any Dreamweaver document. The Library, in other words, is a great place to store copyright notices, navigation bars, or any other chunk of HTML you use frequently.

But this is only half of the Library’s power. Each Library item that you add to a Web page is actually only a copy, which remains linked to the original. Thanks to this link, whenever you update the original Library item, you get a chance to update every page that uses that item.

Suppose your company is bought, for example, and the legal department orders you to change the copyright notice to “Copyright MyBigCompany, a subsidiary of aMuchBiggerCompany” on each of the Web site’s 10,000 pages. If you had cleverly inserted the original copyright notice as a Library item, you could take care ...

Get Dreamweaver MX: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.