Page 1 | Page 2 | Page 3
2 APRIL 2011
This is the Second Page
In this small example, the choice of which template to use is stored on a cookie. You could hard code it if you only want to run one template.

The advantages of this 'skin' system are that you have better separation between the content of pages and the formatting of them. Include files can go some way to doing this but don't make it possible to totally change the layout of a site by editing one page template visually.

Also, using templates allows you to display pages differently for special purposes. On our own site, we have a 'printer friendly' link on each page which simply recalls the page but passes a querystring to tell the buildpage.asp function to use a special print template. This displays the same page content but in simple black and white without menus and graphical headers. You could even use different fonts too since each template has its own stylesheet.

Back to the Article