Forum OpenACS Q&A: How can I find the object_id from a URL

Related to URL abstraction, is there any consistent easy way to get an object_id from a URL? Or is it basically dispatched to the package to determine what to do with the URL?

Even using the content repository, it doesn't seem clear how to resolve an object_id from a request URL.

Collapse
Posted by Dirk Gomez on
It's fully page-dependent right:

* Some pages don't show one object, but multiple objects.

* On the forum-view page the forum_id is the object_id

* On a q-and-a page the question_id is the object_id

* On the message-view page it's message_id etc...

Why do you need this?

Collapse
Posted by Jun Yamog on
Hi Dave,

CR does have a plsql to do that.  I use that all of the time.  But I guess you already know about this.

I think Dirk is right.  Not all pages will only have one object.  I don't think a url and object_id is always one to one as in the case of CR.  It more likely 1 or more object per url.