We're using the "Home"-wiki of modules to build documents we can export as PDF.
In this wiki we're using a self-written macro to show workitems (with a customized header).
This works fine, I can even show a specific revision of a workitem (using getVersionedInstance() ).
Now I'd like to use the "History" view of the "Home"-wiki to see any old revision of this document.
This should possible because the "History" view gives me the specified revision of the wiki page and my macro can do the same for the workitems.
The problem is:
Inside the macro I don't know if I should show the HEAD revision of the workitem or an older revision.
Up to know I gained the following informations:
- $page.revision (which gives me the choosen revision when in "History" view, but when in "Current" view it shows the revision of the last change in page.xml)
- revision of the module directory in the repository
- revision of the workitem directory
- revision of page.xml
Note that there are several possibilities where the last change may have been done (in a workitem, in page.xml or in module.xml).
And things get even worse, if someone uses a workitem from another module in this wiki...
Therefore it would be very handsome to get the information if I'm on "Current" or "History" view (or something like that).