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.
Other kinds of changes to library items include renaming items to break their connection with documents or templates, deleting items from the sites library, and recreating a missing library item.
NOTE
|
|
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 cant include a body tag or its attributes.
|
To edit a library item:
- In the Assets panel (Window > Assets), select the Library category on the left side of the panel.
- Select a library item.
A preview of the library item appears at the top of the Assets panel. (You cant edit anything in the preview.)
- 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 youre editing a library item instead of a document.
- Edit the library item, then save your changes.
- 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 Dont 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:
- Select Modify > Library > Update Pages.
The Update Pages dialog box appears.
- In the Look In pop-up menu, do one of the following:
- Make sure Library Items is selected in the Update option.
TIP
|
|
To update templates at the same time, make sure Templates is also selected. For more information, see Opening a template for editing.
|
- 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:
- In the Assets panel (Window > Assets), select the Library category on the left side of the panel.
- Select the library item you want to rename, pause, then click again.
- When the name becomes editable, enter a new name.
NOTE
|
|
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.
|
- Click elsewhere, or press Enter (Windows) or Return (Macintosh).
- 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 Dont Update.
To delete a library item from a library:
- In the Assets panel (Window > Assets), select the Library category on the left side of the panel.
- Select the library item you want to delete.
- 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 cant 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 doesnt change the contents of any documents that use the item.
To recreate a missing or deleted library item:
- Select an instance of the item in one of your documents.
- Click the Recreate button in the Property inspector (Window > Properties).
Related topics
- Creating a library item
- Making library items editable in a document
- Editing a behavior in a library item