Forum OpenACS Development: Re: CR, content_item_new and context_id questions

Collapse
Posted by Dave Bauer on
OLa,

Context_id is only for the permissions hierarchy.

I think what you want if you are using the CR is either parent_id of the content_item, or to build your own hierarchy in the custom content_type table itself. So your application should not be using context_id to represent the physical relationship of the items in a tree. You might even want to generate your own tree_sortkey for your content_type, although if you use parent_id in the CR, you can use the cr_items tree_sortkey column.

That said, you should be able to set the context_id with the pl/pgsql functions, I'd have to look at the source to see why it isn't working.

Ola, in general you'd want to refer to the item_id in the URL. It doesn't matter what you call it in the URL, but unless you want to access revisions, you usually will reference the item_id and query for the live revision in the page.