Creating and Using Library Items

To create a Library item, start by opening the Library window. Click the Assets tab (to the right of the Files tab) or choose Window→Assets, and then click the Library items button (it looks like an open book, circled in Figure 18-4) to reveal the Library category.

The Assets panel’s Library category lists the name, file size, and location of each Library item in the currently open site. When you select an item from the list, you see a small preview. In this example, the Library item “Copyright” is, shockingly, a copyright notice.

Figure 18-4. The Assets panel’s Library category lists the name, file size, and location of each Library item in the currently open site. When you select an item from the list, you see a small preview. In this example, the Library item “Copyright” is, shockingly, a copyright notice.

Note

Keep in mind that Library items can contain only page elements that appear in the document window—in other words, only HTML from the <body> section of a web page. You can’t include anything that appears in the <head> of a page, like Cascading Style Sheets, Spry widgets (Chapter 13), or meta tags. This means you can’t store Dreamweaver behaviors or Spry widgets in your Library (but you can include them with a Dreamweaver template, discussed in the next chapter). Furthermore, Library items must include a complete set of HTML tags—both an opening and a closing tag—as well as all the tags necessary to complete the original object. For example, Dreamweaver doesn’t let you turn just a single cell, row, or column of a table into a Library item. If you try, Dreamweaver will add the entire table to the Library.

Now select ...

Get Dreamweaver CS6: 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.