Both library items and templates only work where one has defined a site in Dreamweaver. Both create files that are stored in special folders within the site that are used by Dreamweaver but do not need to be uploaded to your web site unless one needs to download these files for use with Dreamweaver on another machine.

Libraries in Dreamweaver

A library item is a file with an extension .lbi which is designed to be used in more than one web page and is stored in a special folder within the site. When one changes the library item and saves it, Dreamweaver prompts the user whether they want to update the library item in other files in which it has been inserted. If the user selects yes, this updating is done automatically. To convert a portion of an existing web page into a library item, one (1) selects the desired portion and then chooses Modify>Library>Add Object to Library, or (2) In the Library category of the Assets panel, click the New Library item, or (3) Drag the selection into the Library category of the assets panel.

To insert a library item into a page, one positions the insertion point at the desired point and then either (1) drags the item from the Library category of the Assets panel or (2) Highlights the library item and clicks the Insert button at the lower left of the Assets panel. The library item will be displayed with a yellow background color in both Design and Code view.

To edit a library item for editing, one can either (1) Double click the item in the Library category of the Assets panel, or (2) Select the item in the Library category of the Assets panel and click the Edit button in the lower right of the Assets panel, or (3) Select the item in the document window and click Open. The Property Inspector also allows you to detach a libary item, breaking the connection between the library item on the current page and the copy in the Library so that subsequent updates won't change the current page. If you have deleted the library item from the Assets panel, it can be recreated by selecting the library item in a page and then clicking Recreate in the Property Inspector.

Templates in Dreamweaver

Dreamweaver templates are files constructed in Dreamweaver that have an extension .dwt and are stored in a folder named "Templates" within the site. Once the template is created, one can create one or more pages in Dreamweaver based on the template. After these pages are created, if in Dreamweaver one makes a change in a template and saves the termplate file, a message will be displayed asking whether files based on the template should be updated as well. Thus templates function like library items. However, all sections of a page utilizing library items can be changed, whereas in a file based on a template, no section of a page can be edited unless that section is made editable in the template file on which the page is based.

To create a template from an existing page, one can choose File<>Save As Template. To create a template from scratch, one chooses File>New and then chooses Blank Template in the New Document window.

To create an editable region within the template, one selects the element or text to be made editable and then choose Insert>Template Objects>Editable Region. One gives this region a name. There are more complex types of editable regions -- see p. 401 in Dreamweaver CS3 Visual Quickstart Guide by Negrino and Smith.

Conclusion

Dreamweaver templates offer the updating capabilities of Dreamweaver while restricting the changes that can be made to web pages. A designer working solo would I think in general prefer the flexibility of Dreamweaver library items.

Revised: May 28, 2008. Comment to William Pegram, bill@billpegram.com