Question
I need a variable like those listed in
TWikiVariables which contains the revision number of the actual displayed Topic.
%TOPIC% only displays the topic name. If you select at URL
.../view/<topic>?rev=1.7
how do you get the "1.7" in the topic displayed ?
Any help ?
- TWiki version: 1 Dec 2001
- Web server: Apache
- Server OS: SunOS
- Web browser: Netscape 4.77 (NT)
- Client OS: Win NT 4 (SP5)
--
PetricFrank - 04 Apr 2002
Answer
Use
%URLPARAM{"rev"}%.
- rev is:
- (click on previous topic version to see it in action)
--
PeterThoeny - 04 Apr 2002
Just bumping the version up as a guest -- Peter
--
TWikiGuest - 04 Apr 2002
Please note that a future version of TWiki might use only the minor part for the version, e.g.
4 instead of
1.4
--
PeterThoeny - 04 Apr 2002
I need to get the revision number always. Not only in case of displaying an older version of a topic.
--
PetricFrank - 05 Apr 2002
How about using %CURRREV% (note the three R's), which generates '7' for this topic? This was added to the
view script in Sept 2001, so it is in the Dec 2001 release.
It should probably be documented so that it doesn't get removed in a future release, unless anyone objects.
Also, this only works for
view, and should probably be enhanced so that Preview works as well (although it would only show the current revision number, not any new revision that might be created on Save).
--
RichardDonkin - 05 Apr 2002