Reusing Content with Templates and Libraries > Creating, managing, and editing library items > Making changes to a library item |
Making changes to a library item
When you change a library item, you can choose to 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 by choosing Modify > Library > Update Pages.
Other kinds of changes to library items include renaming items to break their connection with documents or templates, deleting items from the site's library, and recreating a missing library item.
Note: The CSS Styles panel, Timelines panel, and Behaviors panel are unavailable when you are editing a library item, because library items can contain only body
elements. Timeline and CSS style sheet code is part of the head
section, and the Behaviors panel is unavailable because it inserts code into the head
section as well as the body
section. (For instructions on editing behaviors, see Editing a behavior in a library item.) The Page Properties dialog box is also unavailable, because a library item can't include a body
tag or its attributes.
To edit a library item:
1 | Choose Window > Library. |
The Library category of the Assets panel appears. | |
2 | Select a library item. |
A preview of the library item appears at the top of the Assets panel. (You can't edit anything in the preview.) | |
3 | Click the Edit button at the bottom of the Assets panel. Alternatively, 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 you're editing a library item instead of a document. | |
4 | Edit the library item and then save your changes. |
5 | In the dialog box that appears, choose whether to update the documents on the local site that use the edited library item: |
Choose Update to update all documents in the local site with the edited library item. | |
Choose Don't 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:
Choose Modify > Library > Update Current Page.
To update the entire site or all documents that use a particular library item:
1 | Choose Modify > Library > Update Pages. |
The Update Pages dialog box appears. | |
2 | In the Look In pop-up menu, do one of the following: |
Choose Entire Site, and then choose the site name from the adjacent pop-up menu. This updates all pages in the selected site to use the current version of all library items. | |
Choose Files That Use, and then choose a library item name from the adjacent pop-up menu. This updates all pages in the current site that use the selected library item. | |
3 | Make sure Library Items is selected in the Update option. (To update templates at the same time, make sure Templates is also selected. See Updating pages based on a template for more information.) |
4 | 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:
1 | Click the name of the library item once to select it. |
2 | After a brief pause, click again. |
3 | 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, be sure to pause briefly between clicks. Do not double-click the name; that opens the library item for editing. | |
4 | Click elsewhere, or press Enter (Windows) or Return (Macintosh). |
5 | 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 Don't Update. | |
To delete a library item from a library:
1 | Select the item in the Library category of the Assets panel. |
2 | Click the Delete button and confirm that you want to delete the item. |
Be careful; if you delete a library item, you can't use Undo to retrieve it. You may be able to recreate it, however, as described in the next procedure. | |
Deleting a library item removes the item from the library, but doesn't change the contents of any documents that use the item. | |
To recreate a missing or deleted library item:
1 | Select an instance of the item in one of your documents. |
2 | Click the Recreate button in the Property inspector. |