You may need to write two or more file with common header and footer (except
from title or something else).
By default WPP include a file 'templates/head.tmpl' after the $Date$
tag and 'templates/tail.tmpl' when reach the end of the raw file.
In the first step we have used the
@HEAD@
and
@TAIL@ directives in order to avoid
to include them.
Modify p.raw and create 'templates/head.tmpl' and 'templates/tail.tmpl'.
p.raw
@TITLE=My First Page@
$Date$
This is an example page.
...
templates/head.tmpl
<HTML>
<HEAD>
<TITLE>@TITLE@</TITLE>
</HEAD>
<BODY>
<H1>@TITLE@</H1>
templates/tail.tmpl
Author: jack@AT@hide
</BODY>
</HTML>
The template is simply an html fragment that may contain variables and if
conditions, as you can do in a .raw file.
Including an html fragment is quite simple, write it into a file in the
templates directory and call it fragment.tmpl (don't forget the
'.tmpl' extension).
To include the template use the
@INCLUDE fragment@ directive
(here you
must omit the 'templates' directory and the '.tmpl'
extension).
Into the templates directory you can create other directories, i.e. in order to
include 'templates/dir/fragment.tmpl' simply use @INCLUDE dir/fragment@.