29 Jun
2001
29 Jun
'01
4:25 p.m.
Sedat Yilmazer wrote:
I mean how can I access the older versions of a given document from dtml/python something like olddoc=doc.previous_version
You can use the manage_change_history method of an object to return a list of mappings describing each historical revision. With that, you can retreive a revision using the HistoricalRevisions attribute, which is like a dictionary. For example, to retreive the last revision use: revisions = obj.manage_change_history() return obj.HistoricalRevisions[revisions[0]['key']] or from dtml: <dtml-var expr="HistoricalRevisions[manage_change_history()[0]['key']]"> hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>