Forum OpenACS Development: Modifying behavior of

Collapse
5: Modifying behavior of (response to 1)
Posted by Dave Bauer on
Gustaf,

I am not sure, forcing the selection of latest revision will provide expected behavior.

I am working on an application that does not automatically publish revisions, an administrator must click the button to set a revision live.

In this case, I want admins to be able to read the unpublished revisions but not anyone else.

The reason I took to changing how fetch object works, is that I could not find a straightforward way to modify the behavior that generates the links to the object in the admin pages.

This is where it uses select_instances_query. I created a method on my class to do this query which is fine.

Now I have to figure out how to modify the link to an individual page to go to the specific revision, based on my query, and fetch_object can remain unchanged. In the regular list of objects (xowiki/www/admin/list.tcl) it just uses the name of the page, and I don't see the best way to modify this. Any advice?

Collapse
Posted by Gustaf Neumann on
Dave,

i just checked in a small modification of xowiki + xotcl-core that handles items with different publish_statues differently. It distinguishes between publish_status 'production' and 'ready'. The status can be toggled from the admin pages. When the new package_parameter "production_mode" is set, an edit results in a page in state "production" which needs to be made "ready" from the admin pages. The various aggregators from xowiki (e.g. weblog, last_visited, ...) don't display pages in 'production' mode.

It is not completely clear to me, how this is supposed to interact with the live_revision, and what to do on links pointing to pages not 'ready'.