2.4. Deleting an item from the Library
Removing an entry from your site's Library is a
two-step process. First, you must delete the item from the Library
category. Second, if you want to keep the item on your page, you must
make it editable again. Before you complete the second step,
Dreamweaver maintains the Library highlighting and, more important,
prevents you from modifying the element.
To delete an item from the Library, follow these steps:
Open the Web page containing the Library item you want to delete.
Open the Library category by choosing Window => Assets.
Select the Library item in the Site list and click the Delete button.
Dreamweaver
asks if you are sure you want to delete the item. Click Yes, and the
entry is removed from the Library item list. (Or click No to cancel.)
In the Document window, select the element you are removing from the Library.
In the Properties panel, click Detach from Original.
As shown in Figure 3,
Dreamweaver warns you that if you proceed, the item cannot be
automatically updated (as a Library element). Click OK to proceed. The
yellow Library highlighting vanishes, and the element can now be
modified individually. Check the Don't Warn Me Again box to disable any
future warnings about detaching Library items.
NOTE
Should you unintentionally delete a Library item
in the Library category, you can restore it if you still have the entry
included in a Web page. Select the element within the page and, in the
Properties panel, click the Recreate button. Dreamweaver restores the
item, with the original Library name, to the Library item list.
2.5. Renaming a Library item
It's easy to rename a Library item, both in the
Assets panel and across your site. Dreamweaver automatically updates
the name for any embedded Library item. To give an existing Library
entry a new name, open the Library category and click the name of the
item twice, slowly — do not double-click. Alternatively, you can select
Rename from the context menu of the Assets panel. The name is
highlighted, and a small box appears around it. Enter the new name and
press Enter (Return).
Dreamweaver then displays the Update Files dialog
box with a list of files in which the renamed Library item is
contained. Select Update to rename the Library item across the site. If
you select Don't Update, the Library item is renamed only in the
Library category. Furthermore, your embedded Library items are orphaned
— that is, no master Library item is associated with them, and they are
not updatable.
One of the most common — and useful — applications
for a Library item concerns site navigation. In this Dreamweaver
Technique, you create a Library item for the bottom, text-based
navigation and apply it to a number of pages.
From the Techniques site, expand the 29_Library_Items folder and open the library_items_start1.htm file.
In Design view, move to the bottom of the page and place your cursor in the footer area text navigation.
In the Tag Selector, select the <p> tag.
Although you can create a Library item out of any code fragment, it's generally best to work with a complete tag.
From the Files panel group, click the Assets tab.
Choose the Library category, the last icon on the left side of the Assets panel.
Click New Library Item from the bottom row of the Assets panel.
Dreamweaver
reminds you that the Library item may not look the same when inserted
in other pages because of the associated CSS; click OK to acknowledge
the reminder.
Your selection is converted into a Library item and displayed in the Assets panel.
Replace the Untitled Library item name with textNavigation, and press Enter (Return).
Dreamweaver asks if you'd like to update the links in the current .lbi file; click Update.
If you have Invisible Elements enabled, you
might notice a light yellow highlight around the text navigation now;
this indicates that it is no longer directly editable and is now a
Library item.