![]() |
WPP v2.13 - The Web Preprocessor Author : Marco Lamberto |
![]() |
![]() |
||
Index | < Previous Next > | |
![]() |
Step 1: Yor first file | ![]() |
Suppose you have a file p.html that you wish to generate throught
wpp.
Make a 'raw/templates' directory with the command:
mkdir -p raw/templates
Files in the raw directory are called raw files, files in the templates
directory are called templates.
Enter into the raw directory and start writing a new file called p.raw
|
Suppose you want to change the "Generated from p.raw" title it into
"My First Page", you have to write it twice.
You could use sed but if you don't know it or don't want to use it the
best solution is to use wpp.
|
Step 2: Using templates | ![]() |
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 a templates/tail.tmpl at the end of file.
In the first step we have used the @HEAD@
and @TAIL@ directives in order to avoid to
include them.
Now you can change p.raw and create templates/head.tmpl and
templates/tail.tmpl.
|
|
|
Step 3: The config files and the conditional generation | ![]() |
When wpp is started it first look into the raw directory for a file called
'config' (this is the default, you can specify a different file with the
config file switch).
Here you can put common variables and use different config files for
conditional generation of files.
In example you could create a file called ctest.raw:
|
![]() |
|||||
^ Top | < Previous Next > | ||||
![]() |
|||||
Marco (LM) Lamberto
lm@geocities.com Revised: 2000/12/10 12:34:07 http://www.geocities.com/Tokyo/1474/wpp/manual_3.html |
|
![]() |