• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 7. Using Libraries > Modifying a Library Item Containing Behaviors

Modifying a Library Item Containing Behaviors

Library items that contain behaviors require a more complex editing process than items that do not contain behaviors. The options on the behaviors panel are grayed out while you are editing a library item, so you can't modify a behavior from the library panel. You must first detach the item from a page in order to make your changes. You can then delete the original item and create a new one from the modified elements. The following steps demonstrate how to edit these kinds of library items.

In the road.htm document, select the header library item at the top of the document.

You created a library item from this table in the previous exercise.

Make a note of the name of the library item, and then click Detach from Original in the property inspector.

The name of this library item is header. It is important to remember the exact name so that when you make this table a library item again, any links to the library item in the rest of your site will remain correct. Now that you have detached the item, you can edit the rollover.

Select road.htm and choose Window > Behaviors to open the Behaviors panel.

This rollover uses the wrong graphic when it swaps. In the following steps, you'll change the graphic from a kayaking image to a biking image.

Double-click the existing Swap Image action in the list of attached behaviors on the Behaviors panel.


Make sure you double-click the Swap Image action, not the Swap Image Restore action.

The Swap Image dialog box opens.

In the Swap Image dialog box, click Browse to find bike_ad_f2.gif and choose the image by clicking Open (Macintosh) or Select (Windows). Click OK to close the Swap Image dialog box.

The Swap Image dialog box closes, and the rollover now uses the correct image.

Select the original library item, header, in the Library panel. Click the delete button at the bottom of the panel.

The original library item is now deleted. Because it is not possible to edit behaviors directly in a library element, you have to delete the original item and replace it with a corrected version.

Select the table at the top of the document.

You will use this table to replace the original library item.

Click the new library item button at the bottom of the Library panel and name the library item exactly as the original was named.

The modified elements are now stored in the Library folder.

Choose Modify > Library > Update Pages. In the Look In drop-down menu, choose Entire Site. In Update checkboxes, check the Library Items box and uncheck the Templates box. Check the Show Log box and click Start.

The pages in the rest of the site that once used the original header library item are now updated with the new version.

Click Close to close the dialog box. Save the road.htm document and test your pages in the browser.

Both road.htm and biking.htm will now use the correct rollover image.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint