You will often want to use the same piece of code in different template files.
This can be easily done by putting the common code into its own file and then using the {%INCLUDE%} tag to insert the contents of that file into the template when it is needed.
Awasu uses this feature heavily, putting the bulk of the template code into a separate file that is then included by whoever needs it.
For example, the Rusty.template file looks like this:
<html>
<head>
{%INCLUDE% includes/StandardHead.include}
<style>
{%INCLUDE% Rusty.css}
{%INCLUDE% Rusty.user.css isOptional}
</style>
</head>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<body>
{%INCLUDE% includes/StandardBody.include}
</body>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</html>
In each case, the {%INCLUDE%} tag is replaced with contents of the specified file [1].
The special {%BASE-DIR%} template parameter is adjusted each time to point to the directory that the template file currently being processed lives in. This allows template files to reference external resources such as images.
For example, from Rusty.css:
.banner
{
background-image: url( "file://{%BASE-DIR%}/images/Rusty/banner.png" ) ;
background-repeat: repeat-x ;
border: 3px double ;
padding: 10px ;
color: #fff ;
}