Forum OpenACS Q&A: Serving pre-formatted uploaded htmls


My problem is the following: users upload htmls trough file
management, and then publish the link trough news or whatever. I want
to serve those pages with my own header and footer, automatically. Is
that already done, or i have to look for a place where hook code for

I've been looking at static-pages module, but i still can't
undesrstand how the thing works.

Thanks in advance,


Posted by Ola Hansson on
This doesn't sound impossible.

After you have syncronized the documents with the db from /admin/static, ad_header and ad_footer should be invoked. (You can edit them to your liking) You might also wanna study the choises of in the parameters.tcl file.


Posted by Anton Bajri on
Thanks for the comment...

I looked more thoroughly, and results that files are stored in the database... in some weird manner. There's no blob field in the fs_version table and there IS a "POSTGRESS don't know what to do" comment in the SQL documentation, but is a fact that the thing works. Somehow. Anyone could enlighten me on what's the deal with postgres and blobs?

So, static-files wouldn't work, but at least i found where the blob is served, so it's all about checking the mime type and using ad_serve_html_page or whatever it is called.