Modifying a Library Item


When you edit a library item, you need to edit the item's source file in the Library folder. A source file can be either the original library item or one that was re-created using the techniques from the previous exercise. Editing a library item changes the library item only. When you finish editing, Dreamweaver prompts you to update all the pages in the site that use the item, letting you choose whether or not to make these changes throughout the entire site. Dreamweaver accomplishes the update by searching for comments that reference the library file you just edited and then replacing the old HTML code with your new HTML code. If you remove the library comments from the code, the contents are no longer associated with the library item and can no longer be changed by updating the library item.

Note

Any modifications to the library item must be made to the source file that is located in the Library folder. If you want to edit the content directly in a document, you must first break the link to the library item. To do this, either hold down Ctrl (Windows) or Option (Macintosh) when inserting the item, or select the item on the page and click the Detach from original button on the Property inspector.


1.

Double-click the copyright file icon on the Library category of the Assets panel.

Tip

If the Library category of the Assets panel is not open, choose Window > Assets and click the Library button on the Assets panel.

Dreamweaver opens the copyright library item for editing. When library items are inserted on a page, they take on the properties of that document; text and link colors change according to the default colors set for the document, unless you have specified inline Cascading Style Sheets (CSS) styles or other formatting directly in the library item).

Tip

Alternatively, you can select copyright on the Library panel and then click Edit on the panel. You can also select the library item on a page and click Open in the Property inspector.

2.

In the Document window of the copyright library item, copyright.lbi, insert a horizontal rule above the copyright text. Change the height of the horizontal rule from undefined to a value of 1 in the Property inspector. Save the document.

Tip

You can insert a horizontal rule as you learned in Lesson 2: Either by clicking the Horizontal Rule button in the HTML category of the Insert bar or by choosing Insert > HTML > Horizontal Rule.

The Update Library Items dialog box opens with a list of all the files in your site that use the copyright library item.

3.

Click Update to update all the documents in your site that use the copyright library item.

The Update Pages dialog box shows which pages have been updated with your changes.

Tip

If you have a large site, you might prefer to wait to update your site with all your changes at once. In that case, click the Don't Update button when you save the library item.

4.

Click Close to close the Update Pages dialog box.

The horizontal rule should be in its new location in both community_intro.html and BeginningGreen.html.




Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net