Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 36,739 times

Contents

Related Categories

Creating a Template - Using the template

cheesekeeper

Using the template

Now to use your template, all you have to do is include the template file, then call Header and Footer at the appropriate locations. Here's the code for a sample page that imports the template.

<!--#include virtual="/include/template.asp"-->
<% Header "Template Test" %>
This is a test of my new template! Isn't it nifty?
<% Footer %>

The resulting page looks like this:

Template Test
Nav 1
Nav 2
Nav 3
This is a test of my new template! Isn't it nifty?

That's all there is to it. The real advantage to using a template is maintainability. If you need to change the navigation on your site, you don't have to go and change every single page anymore, nor do you have to resort to clunky frames. You can simply modify your template.asp file, and every page on your site changes.

Comments