Tags:
create new tag
view all tags

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

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2002-04-05 - RichardDonkin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.