Another Expression web feature that I have used in this website is the Dynamic Web Template Feature. Here you will see I have a file called gallery.dwt and if we go into gallery tool you will see that I have a series of pages featuring photographs of the elk that are all created from the same template. Notice that these are almost exactly the same as one another only the image and the caption are changing. The advantage of using a template when you have a series of pages like this is that you can create one page design and reuse it over and over again as you create this kinds of pages. But the biggest advantage comes after you have created the pages when almost invariably you are going to want to make a change someday and you are not going to want to have to go back into every page in your website to make that change, so templates are almost always designed like this.
Elements like the navigation options at the top of the page in this banner are house in the template itself and thus they are locked. So if you notice as I roll my cursor over here, I get that circle with a line through it, the universal you cannot edit this part of the page symbol. Those features can only be changed in the template itself. If I open the template you will see that all that is in the template is the banner, the navigation options and a couple of other little things like this copyright. Within each of the pages I have an editable area, this middle region where I can change the image, I can change the text, and I can change the links to the next and previous images.
So again without getting too detailed on how this works the advantage to using templates early on your design process is as soon as you are going to create more than three pages that are almost the same. It is a really good time to learn how to use Dynamic Web Templates and set that page up as a template and here I will show you a quick demonstration of how that can save your time later.
Let us say you have created your pages and years gone by, you have not thought about them and it is 2009. You need to update that copyright. Well if we backspace, replace that eight with a nine in the Dynamic Web Template watch what happens when I save it. I am just pressing control S now the CSS file has to be saved, that is fine because we are having some changes to that earlier but now you see this corresponds to my Dynamic Web Template. There are eight files that I have actually created from this template and in addition to this four gallery pages, some of the other pages in the other galleries are also created from this template.
When I click yes here, my little change copyright 2008 to copyright 2009 will be applied to all eight of those pages instantly. I love how that works, so now I can close this and notice that there is a little asterisk next to each of my pages now because Expression web made the change it now says 2009, but it has not actually saved it because the file is open. So as I close this I can save them and you will see that all of this has been updated automatically because I used that template. So a great approach to web design when you are creating a simple static site like this but you want to have some of the efficiencies of being able to make global updates like that copyright update. The Dynamic Web Template Feature is perfect for this.
One last little detail about templates, when you make changes to the layout here in the template, those have to be saved and applied to the different pages so each of these files was actually physically changed when I changed the template. Thus all of those files will need to be re uploaded to my web server before that change will become visible on my published website.
In contrast, if I make a change to the style sheet and notice that I have the CSS style sheet attached to the template, when I make a change to a style sheet that change does not have to be updated individually on each page. It is one change on one external style sheet and because the browser is interpreting those styles, you do not have to update all of the pages that have a style sheet attached to them. You just have to update this style sheet itself, so again my goal is just to give you a flavor, you can work with CSS to create styles. You can work with dynamic templates so that you can easily update things like navigation elements, and copyright information and banners and you can combine those two to create a static site with many of the same kind of advantages you can get when you graduate from more dynamic database driven site.
Transcription by:
Scribe4you Transcription Services