ALP SimpleTemplate Content Generator
SimpleTemplate content generator class is capable of replacing special tags found in a text file with the values from query string and form post. It is useful as an addition to ALP applications using other techniques that sometimes need just to display a part of the passed parameters. For example a script may want to give the user chance to review his/her input before saving the values in the database - using template will help to avoid writing a script just for displaying the values passed through the request.

Configuration:

Sample configuration is listed below:

        { html-tml: (CG.newObjects.SimpleTemplate)
            (int)RequireAsynch=1
            (int)Timeout=60
            (int)CheckThatFileExists=1
            (int)IsScriptEngine=1
            { FileTypes:
                (string)*=text/html
            } FileTypes;
            { REPLACE:
                (string)Caption=Application caption
                (string)Caption=Subcaption
                (string)Company=ACME Inc.
            } REPLACE;
        } html-tml;

Sample above shows recommended values for the standard settings (see File extension subsections for details) and a sample set of the specific SimpleTemplate settings.

FileTypes subsection as like in the RawSpool content generator specifies the content type for the transferred resource. SimpleTemplate is typically registered to handle single file extensions thus this subsection should contain only (string)*=desired_content_type setting. It is possible in some rare case to register this component to handle File section in the InternalExecutionMap - in that case list of content types returned for the different file extensions will be useful. All values in the FileTypes section are of type string (see Configuration general syntax).

REPLACE subsection defines an application wide constants for the extension. These constants are used to replace tags in the templates with a common values for the entire application.

See also: Template syntax

newObjects Copyright 2001-2006 newObjects [ ]