Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

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

Chapter 8: Using Templates > Choosing the Right Template Structure

Choosing the Right Template Structure

There are many ways to approach setting up a website template system. In this section, we'll look at two of the most common: creating a static template file you reuse for each new page, and creating a dynamic template system by assembling pages consisting of multiple parts. Both have their advantages and disadvantages.

Creating a static template file

This approach, creating one file with all the necessary elements and using it for each new page in your site, works best for smaller sites. The primary drawback to this approach is that if you need to make changes to any of the elements that make up the template file, each page that uses the template file will also need to be changed.

tip.eps This is not as bad as it sounds. If you use Dreamweaver or a source code editor such as UltraEdit, these programs have search-and-replace features that allow you to find and replace text and code across multiple — even thousands — of files at once. You just have to be very careful about how you construct your search-and-replace criteria. In other words, be very sure the change is constructed properly before you click Replace All.


You are currently reading a PREVIEW of this book.


Get instant access to over $1 million worth of books and videos.


Start a Free Trial

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint