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

Chapter 16. Working with Library Items > Understanding Library Items

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 functionality—such as navigation menus, copyright notices, and a company logo—that 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 site—and instantly, all 100 pages that use the library item are instantly updated. Figure 16.1 outlines the library item-based model.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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