[Moin-user] Re: Macros and page revisions

Malte Helmert helmert at informatik.uni-freiburg.de
Mon Feb 14 10:49:49 EST 2005


Alexander Schremmer wrote:
> On Mon, 14 Feb 2005 15:23:51 +0100, Malte Helmert wrote:
> 
> 
>>What is the preferred way to find out which revision of a page is 
>>currently being displayed from within a macro?
>>
>>I expected the attribute macro.request.page.rev to contain this 
>>information, but it seems to be "0" all the time. Is this a bug?
> 
> I am not sure. Maybe. Or maybe it is just an inconsistency because nobody
> relies on that attribute at that point. File a bug to find out if it is a
> bug.

I will, thanks!

>>On a related note, which dependencies should I set for a macro that 
>>depends on the page revision? For example, the macro could print "foo" 
>>for revision 2, but "bar" for revision 3. If I first look at revision 2, 
>>then at revision 3, I don't want to display "foo" for revision 3 due to 
>>the cache.
> 
> You cannot depend on a page revision. Only the latest revision is cached,
> so every macro is always current for the fetched page revision.

Thanks, that's good news. This seems to be very reasonable behaviour, 
given that looking at old page revisions should be relatively uncommon.

Malte





More information about the Moin-user mailing list