Skip to content

Commit

Permalink
Item11383: Document REVARG and REVTITLE
Browse files Browse the repository at this point in the history
Also fix up documentation for REVINFO - had cut/paste errors from GMTIME
macro.

git-svn-id: http://svn.foswiki.org/branches/Release01x01@14232 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Mar 7, 2012
1 parent df7e302 commit cb9b9fd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
8 changes: 8 additions & 0 deletions core/data/System/VarREVARG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%META:TOPICINFO{author="ProjectContributor" date="1331139711" format="1.1" version="1"}%
%META:TOPICPARENT{name="Macros"}%
#VarREVARG
---+++ REVARG -- =&rev=n= URL revision parameter of current topic
* Syntax: =%<nop>REVARG%=
* =%<nop>REVARG%= If a topic revision is requested in the URL, it returns the revision of the current topic suitable for concatenation to the view query parameters. Otherwise returns an empty string.
* Expands to: _(simulated)_ =&rev=3= _(actual)_ <code>%REVARG%</code>
* Related: [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVINFO][REVINFO]], [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVTITLE][REVTITLE]]
10 changes: 6 additions & 4 deletions core/data/System/VarREVINFO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
%META:TOPICPARENT{name="Macros"}%
#VarREVINFO
---+++ REVINFO -- revision information of current topic
* Syntax:
* Date format defined as ={DefaultDateFormat}= in [[%SCRIPTURLPATH{"configure"}%#Locale$Internationalisation][configure]]
* Syntax: =%<nop>REVINFO%=
* =%<nop>REVINFO%= is equivalent to =%<nop>REVINFO{format="r1.$rev - $date - $wikiusername"}%=
* Expands to: <code>%REVINFO%</code>
* Related: [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVARG][REVARG]],[[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVTITLE][REVTITLE]]
---+++ REVINFO{"format"} -- formatted revision information of topic
* Syntax: =%<nop>REVINFO%= OR =%<nop>REVINFO{"format"}%=
* Syntax: =%<nop>REVINFO{"format"}%=
* =%<nop>REVINFO%= is equivalent to =%<nop>REVINFO{format="r1.$rev - $date - $wikiusername"}%=
* Expands to: <code>%REVINFO%</code>
* Supported parameters:
Expand All @@ -28,5 +30,5 @@
| =$min=, =$sec=, etc. | Same date format qualifiers as [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarGMTIME][GMTIME{"format"}]] | |
* Example, returns revision info of first revision: <verbatim class="tml">%REVINFO{"$date - $wikiusername" rev="1.1"}%</verbatim>
* To get the latest revision, even when looking at an older revision: <verbatim class="tml">%REVINFO{"$rev" rev="-1"}%</verbatim>
* Related: [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarGMTIME][GMTIME{"format"}]], [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVINFO][REVINFO]]
* Related: [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVARG][REVARG]],[[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVTITLE][REVTITLE]]
<!--%JQREQUIRE{"chili"}%-->
8 changes: 8 additions & 0 deletions core/data/System/VarREVTITLE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%META:TOPICINFO{author="ProjectContributor" date="1331139711" format="1.1" version="1"}%
%META:TOPICPARENT{name="Macros"}%
#VarREVTITLE
---+++ REVTITLE -- =(r1)= The requested revision as displayed in topic breadcrumbs
* Syntax: =%<nop>REVTITLE%=
* =%<nop>REVTITLE%= If a topic revision is requested in the URL, it returns the printable revision of the current topic revision. Otherwise returns an empty string.
* Expands to: _(simulated)_ =(r3)= _(actual)_ <code>%REVTITLE%</code>
* Related: [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVINFO][REVINFO]], [[%IF{"'%INCLUDINGTOPIC%'='Macros'" then="#"}%VarREVARG][REVARG]]
2 changes: 2 additions & 0 deletions core/lib/Foswiki/Contrib/core/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ data/System/VarREMOTEADDR.txt 0644
data/System/VarREMOTEPORT.txt 0644
data/System/VarREMOTEUSER.txt 0644
data/System/VarRENDERZONE.txt 0644
data/System/VarREVARG.txt 0644
data/System/VarREVINFO.txt 0644
data/System/VarREVTITLE.txt 0644
data/System/VarS.txt 0644
data/System/VarSCRIPTNAME.txt 0644
data/System/VarSCRIPTSUFFIX.txt 0644
Expand Down

0 comments on commit cb9b9fd

Please sign in to comment.