Forum OpenACS Q&A: Re: Questions about static pages

Collapse
Posted by Reuven Lerner on
Well, the API is surprisingly straightforward.  The problem is that plain ol' ADP pages don't have an object ID, because they're not in the database.

So while I would love to simply say

    set comment_link [general_comments_create_link]

in my .tcl file, the above code throws an exception, saying (more or less) that it cannot infer the object ID, and that I have to give it an explicit value.

If I were only interested in doing this for a single ADP page, I would be happy to lie about the object ID, "borrowing" one from soemwhere else within the same subsite that won't ever have any comments associated with it.  But not only is that ugly and potentially dangerous, but I imagine that it's unnecessary, and that I can somehow create (and then retrieve and reuse) an object ID that's associated with the page.

Any ideas?