Forum OpenACS Q&A: Response to ADP versus HTML

Collapse
Posted by Matthew Braithwaite on
Parsing the ADPs before stuffing them into the database sounds like the Right Thing to me. But if you don't feel like branching, this works:
<%= [mab_page_header "<title>Page Title</title>"] %>
...where mab_page_header is some function you've written that strips out the title tags. I hear you gagging, but it does the job. As long as the stuffer sees <title> somewhere, it doesn't care too much about the context.

And of course you can always make your footer function DTRT for General Comments/Links. I agree it would be better to have it all done for you by ad_serve_html_page.

There's also an abstract URL issue here, which I asked about a while ago on the mailing list. I'll reproduce it here:

Another problem in this mess is that the process of stuffing static content into the database includes the extension. Will it be hard to make this play with abstract URLs? My worry is that if an adp is invoked abstractly (without the .adp extension) and it calls gc_insert_comments_here or whatever, that proc won't have a means of determining the actual file name that it's running under (as distinct from the URL), and that as a result it won't find its comments, because they are indexed under the file name, not the abstract URL.
I use abstract URLs for everything, so I would much rather that commments/links were indexed in the database by abstract URL. But I don't really know for sure whether this is broken or not.