Understanding Library Items
Library items, like templates, provide a method for creating a centralized piece of functionality that multiple pages in your site can use. The major differences between templates and library items, however, is that templates generally represent the overall design of a site. You create one master template file, define editable regions, and then establish pages based on that template (also known as a template-derived page). If changes need to be made to the design of the website, you'd open the template (DWT) file, make the change, save the file, and Dreamweaver updates all the pages based on the template file. In general, the model shown in Figure 15.1 (in the previous chapter) accurately depicts the template-based model.Library items, on the other hand, aren't meant to control the design of the site as a whole, but rather are meant to define pieces of functionalitysuch as navigation menus, copyright notices, and a company logothat have the potential of changing throughout the context of the site. For instance, assume you have a navigation menu being used by 100 different pages on your site. Also assume that the footer of every page contains a copyright notice complete with a smaller navigation menu that is also being shared by 100 different pages on your site. Now imagine that your supervisor decides to change a link within the navigation menu and to customize the copyright notice to include the current year. Traditional methods would call for the tedious process of opening all 100 pages and making the changes manually. Library items remedy this problem by allowing you to componentize navigation menus, copyright notices, company logos, and so on into one file and then include that file into every page on your website. Later, if changes need to be made, you open the one library item, make the changes, save the file, update the siteand instantly, all 100 pages that use the library item are instantly updated. Figure 16.1 outlines the library item-based model.
Figure 16.1. Library items provide a way to componentize smaller pieces of functionality so that they can easily be shared across the entire site and updated centrally.
[View full size image]

Figure 16.2. Library items can work with templates in scenarios where you want to use one template in conjunction with multiple navigation menus.
[View full size image]
