Editing a Library Item


You need to be a bit careful when you edit Library items, because when you change a Library item, Dreamweaver changes all instances of that item throughout all the pages of your site, in any documents that are not currently being edited. This can take some time if you have a large site, and you have to edit the item again to undo a mistake; the Undo command won't save you in this case. It's nothing to worry about; just be aware that changes can have far-reaching effects.

To edit a Library item:

1.
Do one of the following:

Double-click the item in the Library category in the Assets panel.

or

Highlight the item in the Library category in the Assets panel and then click the Edit button in the lower right of the Assets panel.

or

Highlight the item in the document window. The Property Inspector shows information for the Library item ( Figure 13.15 ). Click Open .

Figure 13.15. When you select a Library item in the document window, you can use the Property Inspector to open the Library item.


2.
A window much like a document window appears, but it contains only the Library item ( Figure 13.16 ).

Figure 13.16. An open Library item window is rather like a normal document window, except there's nothing there but the Library item.


3.
Edit the item as needed.

4.
Choose File > Save, or press Ctrl-S (Cmd-S). The Update Library Items dialog appears ( Figure 13.17 ).

Figure 13.17. The benefit of using Library items comes from the ability to update any instances of the item in your site with one click of the Update button.


  • Update: Updates every instance of the Library item used in your site.

  • Don't Update: No Library items are updated.

    See the following section, "To update a Library item only in the current document," if you want to select individual pages to update.

5.
Click Update to have Dreamweaver open the Update Pages dialog, run through all the files containing the Library item, update them, and report "Done" to you in the dialog when it's finished ( Figure 13.18 ).

Figure 13.18. If you Update Library items, Dreamweaver reports on what it did.


6.
Click Close to dismiss the Update Pages dialog.

To update a Library item only in the current document:

1.
Edit the Library item, then click Don't Update in the Update Library Items dialog (see the previous section, "To edit a Library item").

2.
Open a document containing the Library item.

3.
Choose Modify > Library > Update Current Page.

4.
The Library item on this single page will update.

5.
Save the document.

To rename a Library item:

1.
Highlight the name of the Library item in the Library category of the Assets panel. Do one of the following:

Right-click (Ctrl-click) and choose Rename from the shortcut menu.

or

Click on the item name, wait a second, and click it again.

The Library item's name highlights and becomes editable ( Figure 13.19 ).

Figure 13.19. Need a better name for a Library item? You can change the name here.


2.
Type the new name for the item.

3.
The Update Files dialog appears ( Figure 13.20 ). Click Update to change the name of the Library item on every page where it is in use.

Figure 13.20. When you change a Library item name, Dreamweaver asks you if you want to change all the instances of the item in the site to reflect the new name.


Tips

  • Library items can't contain any head elements, so you don't have access to the CSS panel when editing a Library item (internal CSS style sheets appear within the <head> tag).

  • Library items can't contain a <body> tag, so you don't have access to the Page Properties when editing a Library item.

  • HTML pages changed by the update of a Library item need to be uploaded to the server for the change to be visible to your site's visitors .

  • If a document is open when a Library item updates, you'll have to save the document manually. Updates save automatically in a closed document.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

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