3. Editing a Library Item
Rarely do you create a Library item that is
perfect from the beginning and never needs to be changed. Whether
because of site redesign or the addition of new sections to a site,
you'll find yourself going back to Library items and modifying them,
sometimes repeatedly. You can use the full power of Dreamweaver's
design capabilities to alter your Library items, within the restraints
of Library items in general. In other words, you can modify an image,
reformat a body of text, or add new material to a boilerplate
paragraph, and the resulting changes are reflected across your Web
site. However, you cannot add anything not contained in the HTML <body> tags to a Library item.
To modify Library items, Dreamweaver uses a special
editing window identifiable by the double-angle-brackets surrounding
the phrase Library Item in the title bar. You access this editing
window through the Library category or the Properties panel. Follow
these steps to modify an existing Library item:
In the Library category of the Assets panel, select the item you want to modify from the list of available entries.
Click the Open Library Item button. The Library editing window opens with the selected entry displayed, as shown in Figure 4.
Make any necessary modifications to the Library entry.
When you are finished with your changes, choose File => Save, or press Ctrl+S (Command+S).
Dreamweaver
notes that your Library item has been modified and then asks if you
would like to update all the Web pages in your site that contain the
item. Click Yes to update all the Library items, including the one just
modified, or click No to postpone the update. (See the next section,
"Updating Your Web Sites with Libraries," for a more in-depth
explanation of the updating process.)
Close the editing window by clicking the Close button or choosing File => Close.
After you've completed the editing operation and
closed the editing window, you can open any Web page containing the
modified Library item to view the changes.
If your Library item is styled with an external
style sheet and you'd like to see how it renders while editing, use
Dreamweaver's Design Time Style Sheet feature. From the CSS Styles
panel Option menu, select Design Time; when the Design Time Style Sheet
dialog opens, select the style sheet from the Show Only at Design Time
area.
|
|
Dreamweaver now allows you to use native Dreamweaver
behaviors inside Library items. That means you can place a navigation
bar, a link for a pop-up window, or any other Dreamweaver behavior
inside your Library item. When the Library item is added to the page,
the accompanying JavaScript is also added.
You cannot use some features to the fullest extent
when editing Library items. These include custom JavaScript and styles.
Each of these modifications requires a function or link to be placed in
the <head> tags of a page — a task that the Dreamweaver Library function cannot handle for styles and custom JavaScript.
|
|