PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: <?SyntaxCheckOff>[Next]: <?TmpDir>
\ -> Standard Definitions -> <?TemplateDataFile>

<?TemplateDataFile[:part1[,part2,...]]>

If the "/Template" switch was not specified then this variable will return an empty value, otherwise the name of the data file is returned (the template typically processes this file).

By using this variable a header file could determine whether or not template processing is occurring.

Note that it is possible to extract parts of the symbol or to perform case conversions. You can extract parts of the filename by supplying one or more comma separated FilePart() parameters, these should be placed immediately after a colon following the symbol name (spaces not allowed).

Case conversion and other transformations of the symbols value can be performed using "macro transformations".

This is a Standard Definition which always exists (you don't need to #define it). Note that you can create your own variations or completely new ones (see the examples).

Example - Extract Parts

There are a number of symbols which all behave in a similar manner, examples follow:

;--- Test access to all or part of the file symbols ---
InputFile      - Full filename       : <?InputFile>
InputFile      - Without Path        : <?InputFile:name>
InputFile      - Parent dir of dir   : <?InputFile:s,s>
InputComponent - Extension           : <?InputComponent:EXTN>
OutputFile     - Path in lower case  : <?OutputFile:L $$lower>
PPWIZARD PGM   - Drive in upper case : <?PpwizardPgm:drive $$upper>

Example - Template

A typical template file might begin like:

;--- Start HTML ---
<html>
<head>
   ;--- Name of "data" file is the pages title ---
   <title><?TemplateDataFile:name,withoutextn></title>
</head>
<body>

;--- Include common definitions ---
#include "common.ih"

;--- Include body ---
#include "<?TemplateDataFile>"

;--- End Html ---
<hr size=1>
<center>
   <?OutputFile:name>
   <br>
   <?CompileTime>
</center>
</body>
</html>


email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: <?SyntaxCheckOff>[Next]: <?TmpDir>


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am