Nested Templates

I’m still pulling content across from my current website into the new layout.  After messing about with dreamweaver for most of the weekend, I created a base template that the entire site will be built upon. (see my post New face of Astronomy.cjdawson.com) However, some of the pages have multiple items in each category, so I wanted to have a menu on the left side of the screen for this.  There are several ways to accomplish this, using PHP is one really flexible method, but for now I decided to use nested templates in dreamweaver.   This technique allows me to create a template based on another template.  So, I can use my base template, as a file which is a template for the projects section.  The project section can have it’s own template which is used for the articles.

This method become really cool when I need to make an adjustment to the base template – for example when I decided to alter the way that the section buttons appear.  I simple alter the base template and it will update all the documents for the entire site.   Everything gets processed correctly, and the change is cascaded throughout the entire site with no effort on my part.

The other way to accomplish the same thing is to have the site programmed up using PHP,  I’m sure that eventually I’ll move over to a PHP data driven web layout but for now, having everything processed locally is perfect for me.

Leave a Reply

Your email address will not be published. Required fields are marked *