Forum OpenACS Development: Templates: Where to store?

Collapse
Posted by Malte Sussdorff on
In one of our installations we are going to support different master templates and form templates per Subsite. Where should these be stored and what about permissioning (to make sure Admin subsite A can't edit templates for Subsite B without permission from Admin B). Is this functionality already in OpenACS ?

Furthermore, how would you have Admins upload their templates (don't tell me using SCP, this is not an option :)) ?

At the moment we allow the admin to select a style using a select box querying all the files in the default location. It works, but does not really reduce SWA (with SSH access to the server) maintenance :).

Collapse
Posted by Malte Sussdorff on
To make life a little bit more challanging, a template consists of the template itself (adp) along with supporting CSS and graphics. This ties in strongly with the effort of a new package structure (https://openacs.org/forums/message-view?message_id=109480 and https://openacs.org/forums/message-view?message_id=110062).
Collapse
Posted by Dave Bauer on
Malte,

For this answer, I am assuming that the tcl datasource will remain the same and you will just ad_return_template the corresponding adp.

You might be able to take advantage of the content repository.  One way would be to create a template content_folder for each subsite. Permissions could easily be controlled that way.

Of course, you still need to process the templates when serving pages. So the next step would be to register another filesystem storage area such as /web/sitename/templates/ with a directory for each subsite.

A third option would be to store the revisions in the standard CR storage, either database or generic filesystem storage, then publish them to the correct templates folder when they change. The tcl api to publishing content to the fileystem in the content repository should work for this.

This question comes back to the more general question of how to modify the built in adp templates provided by a package. I eventually want to genealize a prodedure like this to allow replacement of any adp template.

Collapse
Posted by Dave Bauer on
Another way would be to enable webDAV on the directory where the templates are stored. Unfortunately webDAV support is not quite there yet for AOLserver, so this would probably involve setting up a parallel apache server that allowed webDAV access to the template directory. Either that or some Java solution running inside AOLserver.