"How to" Guideline series is coordinated by Helen Mongan-Rallis of the Education Department at the University of Minnesota Duluth. If you have any questions, comments, or suggestions to improve these guidelines please me at e-mail hrallis@d.umn.edu.

rainbow bar

Making and Applying a Library Object

What is a library object?

This is a special code that you add to your web page that tells the browser to go and get a special set of information from another file and include it with the current page. This special set of information is usually information that you repeat across a number of pages and/or information that you may need to update often. Thus, every page that has this library object on it will show this same information. When you change the information (change the code on just this one page), all these pages will be updated. This makes using a library object a great time saves if you have a number of pages (files) in your site that use the same information. Example of items you might want to make into library objects: Page logo or banner; disability statement on course syllabi; your office address and phone number.

Caution: If you change the library object, you have to upload every page that is affected by it when you make any changes to the library object. This is not too much of a problem in Dreamweaver because (1) When you make a change to the Library Object, Dreamweaver will prompt you and ask you if you want to update all affected pages. If you say yes, (which you should!) then Dreamweaver makes all updates for you (2) When you have made a change that affects multiple pages, you can use the Site --> synchronize command (see details later under Site Synchronization) and Dreamweaver will check and list all the pages that you have changed and that need to be uploaded.

How to make a library object

  1. Create a new file (name it LibraryObject.html or, if you have more than one library object page, name it LibraryObject1.html.
  2. Type in the text or insert the image/s) that you want to be the information that will be repeated.
  3. Select the text and/or image
  4. Go to the Modify menu
  5. Choose Library --> Add object to the library.
  6. In the Library palette that pops up, type in the name that you want this object to be called. Example, I created a library object for the UMD banner and called it "UMD logo banner."
  7. Hit return (Mac) or enter Windows)

Inserting the library object on a page

  1. Click on the page where you want the object to appear.
  2. From the Window menu --> select "Library." This opens the Library Palette.
  3. Click on the library object (from the Library palette) that you want to include.
  4. Click on the "Insert" button at the bottom left of the palette.

    Example: The UMD logo banner that appears below was inserted by using a library object:
    UMD logo and address: 10 University Dr., Duluth MN 55812 (218) 726-6272

Editing the library object

  1. From the Window menu --> select "Library." This opens the Library Palette.
  2. Double-click on the library object that you want to edit.
  3. Make the changes.
  4. Save.
  5. When you save, Dreamweaver will prompt you, asking you if you want to update the pages that use the library object. Choose "Update.

 

rainbow bar

Return to the Index of How To Guidelines