revision number

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

revision number

Duke Tantiprasut
Hi All,

Quick question, how do you get the revision number for a wiki doc?

Thanks.

Duke




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: revision number

cburleso

To get the current document's revision number, try this:

${doc.getVersion()}

The variable doc is initialized by some of the core scripts in XWiki, and represents the current document object. Therefore, you do not have to initialize a new object, you just reference "doc". Following are just a few other interesting calls you can make against the doc object. Paste this little snippet in  document as a reference:

SNIP -----------------------------------------

1.1 Methods that take no parameters as input and return Strings

* doc.getCreator() ~~returns~~
** ${doc.getCreator()}
* doc.getFullName() ~~returns~~
** ${doc.getFullName()}
* doc.getName() ~~returns~~
** ${doc.getName()}
* doc.getParent() ~~returns~~
** ${doc.getParent()}
* doc.getParentURL() ~~returns~~
** ${doc.getParentURL()}
* doc.getVersion() ~~returns~~
** ${doc.getVersion()}
* doc.getWeb() ~~returns~~
** ${doc.getWeb()}

There are other methods that take no parameters as input and return Strings. This is just a basic example. There are also methods that take parameters as input. There are also methods that return different datatypes (but we'd have to study Velocity to understand how to work with those different data types).

END SNIP --------------------------------------
==================================
Cody Burleson





"Duke Tantiprasut" <[hidden email]>

08/30/2005 05:49 AM

Please respond to
[hidden email]

To
<[hidden email]>
cc
Subject
[xwiki-users] revision number





Hi All,

Quick question, how do you get the revision number for a wiki doc?

Thanks.

Duke



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: revision number

Duke Tantiprasut
Thanks Cody.


From: Cody Burleson [mailto:[hidden email]]
Sent: Tuesday, August 30, 2005 4:31 AM
To: [hidden email]
Subject: Re: [xwiki-users] revision number


To get the current document's revision number, try this:

${doc.getVersion()}

The variable doc is initialized by some of the core scripts in XWiki, and represents the current document object. Therefore, you do not have to initialize a new object, you just reference "doc". Following are just a few other interesting calls you can make against the doc object. Paste this little snippet in  document as a reference:

SNIP -----------------------------------------

1.1 Methods that take no parameters as input and return Strings

* doc.getCreator() ~~returns~~
** ${doc.getCreator()}
* doc.getFullName() ~~returns~~
** ${doc.getFullName()}
* doc.getName() ~~returns~~
** ${doc.getName()}
* doc.getParent() ~~returns~~
** ${doc.getParent()}
* doc.getParentURL() ~~returns~~
** ${doc.getParentURL()}
* doc.getVersion() ~~returns~~
** ${doc.getVersion()}
* doc.getWeb() ~~returns~~
** ${doc.getWeb()}

There are other methods that take no parameters as input and return Strings. This is just a basic example. There are also methods that take parameters as input. There are also methods that return different datatypes (but we'd have to study Velocity to understand how to work with those different data types).

END SNIP --------------------------------------
==================================
Cody Burleson





"Duke Tantiprasut" <[hidden email]>

08/30/2005 05:49 AM

Please respond to
[hidden email]

To
<[hidden email]>
cc
Subject
[xwiki-users] revision number





Hi All,

Quick question, how do you get the revision number for a wiki doc?

Thanks.

Duke



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws