Forum OpenACS Development: Re: Improving Gatekeeper Package

Posted by Jade Rubick on
Nima, can you post the relevant portions of the code, and explain it a little. If nobody else has done it, that's probably the best way to get help on it.

I'm not sure if the question is whether or not .vuh files can return templated results, or something easier.

Posted by Tilmann Singer on
The main problem is that most web apps that would be included with gatekeeper like this deliver complete pages already, not only including html and body start and end tags but also their own design and navigation etc. You would need to cut this out somehow before you can wrap it in the openacs template.

Besides that, adding a template around the retrieved data could work like this: add a dummy.adp that contains a unique string that serves as placeholder for your content, retrieve the parsed template into a string like this:

set template [ad_parse_template dummy]

split the result into header and footer:

regexp {^(.*)myplaceholder(.*)$} $template match header footer

and then output header, your content and then the footer with ns_write.