Simple Server-Side Includes with Dreamweaver
Thursday, December 20th, 2007Author of this post: Tara MacKay | About Blog Authors »
Most sites have at least one element, like a navigation feature, a header, or a simple piece of text, that appears on multiple pages. (I really worry about the sites that don’t.) Dreamweaver users can use templates and the library to store repeated elements, and if they do, they need only change the repeated item once, rather than many times on each individual page.

Dreamweaver’s library can store lots of design chunks, but it isn’t always the best solution for repeated elements.
Unfortunately, there are some drawbacks to this method. For starters, all of the library and template code ends up in every page that displays the item. Let’s say your site’s sidebar navigation is a library item. When you build a new page, you can simply insert that item into your design. It’s easy, but check out the page code. It’s long and bulky.
Also, when you change a library item, you have to reload every individual page that features the item. If you have a large site, this can take a long time.
Server-side includes (SSIs) serve the same purposes as library items, but without the drawbacks. Imagine again that your sidebar navigation is a repetitive element. The pages that feature the navigation would only need a line of code that calls or includes code from a separate file. All that’s required is one little line, and if you ever need to update the navigation, you can simply change and upload the include file. (more…)



























