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 images
alt text, or even its
src attribute, throughout the site. (Dont use this technique to change an images
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:
- In the Document window, select a portion of a document to save as a library item.
- Do one of the following:
- 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 sites local root folder.
To create an empty library item:
- Make sure nothing is selected in the Document window.
If something is selected, it will be placed in the new library item.
- In the Assets panel (Window > Assets), select the Library category on the left side of the panel.
- 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.
- While the item is still selected, enter a name for it, then press Enter (Windows) or Return (Macintosh).
- Inserting a library item in a document
- Editing a library item
- Setting library highlighting preferences