Forum OpenACS Q&A: Response to VAT Module

Collapse
3: Response to VAT Module (response to 1)
Posted by Tom Jackson on

The templating works differently than in OpenACS. It was based on my needs for a db backed website that looked static, so search engines would gobble up the pages.

Once setup, a relative url of /mod/wheels would indicate the wheels template in the mod module. You could request this url on your server and see where the VAT module is looking for the file. If the VAT module doesn't find the directory, as in your example above, it continues on looking elsewhere, finally giving up and returning control to the next filter. Your example above was for /. Any request ending in / will search for an index file. The base directory for the search above was /web/portal/vhost/. 'server1' is the name of you gave your server variable set in the VAT module section of your .tcl file, and 'current' is the version variable, which gets set on each request. This is just hard coded as 'current' until you rewrite the tcl proc that sets it. If you create a simple version system where you keep different versions of a website in different directories, 'current' would usually be a symbolic link to the actual version in use. The module name is the first subdirectory in a website. in /mod/wheels, for instance, 'mod' is the module name. in your request for /, the module name is the empty string ''. Putting all this togeather explains why you got the 'No Path' debug statement:

Debug: No path: /web/portal/vhost/server1/current//index

This means $base$server/$version/$module/$template.

If you were to create files like:

/web/portal/vhost/server1/current/mod/index/index-01.tcl
/web/portal/vhost/server1/current/mod/index/index-02.adp
and request /mod/, then the VAT module would process the .tcl and the the .adp in the same tcl level, returning the result.