NAME

Cindy::Apache2 - use unmodified XML or HTML documents as templates.

SYNOPSIS

 RewriteEngine On
 RewriteRule ^/cindy/content/(.*)$  /cindy/content.data/$1 [NS,E=CINDY_DATA_URI:/cindy/content.data/$1]

 PerlModule Cindy::Apache2
 <Location /cindy/content>
 SetEnv CINDY_CIS_URI /cindy/tmpl/frame.cjs
 SetEnv CINDY_DOC_URI /cindy/tmpl/frame.html

 SetHandler  perl-script
 PerlHandler Cindy::Apache2
 </Location>

DESCRIPTION

Cindy::Apache2 uses the Cindy module in an apache content handler. Cindy merges data into a document template using a content injection sheet to create its response.

The idea came from seeing a web designer adding an image to a page with css. When I realized that he was actually injecting content I had found the link I did miss for quite some time. There is data, there is an html template an now there is a content injection sheet. It describes how the data is to be asociated with the template.

Since the handler needs 3 parameters these are passed as enviroment variables. Their names are CINDY_DOC_URI, CINDY_DATA_URI and CINDY_CIS_URI. Alternatively CINDY_DOC_FILE, CINDY_DATA_FILE, CINDY_CIS_FILE can be used. While the former ones are used as URIs (similiar to SSIs include virtual), the latter ones require a file system path. In each case an internal subrequest is made. This means that all three components can be dynamically created.

If one of the components does not return a 200 status, processing is aborted and that status is returned.

AUTHOR

Joachim Zobel <jz-2008@heute-morgen.de>

SEE ALSO

See the Cindy documentation for further explanantions on content injection sheets and on what is done with those 3 files.