Forum OpenACS Q&A: Re: what is a .vuh file

Collapse
5: Re: what is a .vuh file (response to 4)
Posted by Randy O'Meara on
Keith,

Here are a couple of threads that discuss the use of index.vuh. They may be helpful in understanding and actually using this facility.

https://openacs.org/forums/message-view?message_id=121704
https://openacs.org/forums/message-view?message_id=115061

Keep in mind that the request processor (RP) serves up an index.vuh as a last-ditch effort. So, you can't have an "index" file in any of the standard places that the RP looks while resolving a request to a concrete file. For example, if you wanted to use an index.vuh file on the root of your service (/www) then you must be certain that you've moved packages/acs-subsite/www/index.* and /www/index.* out of the way first.

BTW, this is really a slick way to do anything that can be scripted in place of the standard tcl/adp or .html service. You can even do all of your scripted processing and then internally redirect (the user's browser does not receive a redirect response) *after* stuffing whatever values you want into the query var structure. These modified, or additional, query vars are available to the page that is the target of the internal redirect.

Another use would be to do some common processing on *every* page request within a package (or even the entire site, or a subsite).

Check out the edit-this-page package. It uses and index.vuh.

I believe openacs.org also makes use of an index.vuh to publish content on its front page. The openacs.org site is available in CVS.

Randy