[xwiki-users] how to access the title of a document ?
I've been looking for a while but I can't seem to find this. It looks like all documents not only have a name but also a title, which is a more human-readable version (e.g. could contain colons). But how can I access this from velocity ? I will certainly post an FAQ answer as result as indeed, it *should* be there. thanks paul
Are you talking about $doc.title ? Guillaume On 16/01/2008, Paul Libbrecht <[email protected]> wrote:
I've been looking for a while but I can't seem to find this.
It looks like all documents not only have a name but also a title, which is a more human-readable version (e.g. could contain colons).
But how can I access this from velocity ? I will certainly post an FAQ answer as result as indeed, it *should* be there.
thanks
paul _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Paul, Here's a tip for answering all these questions. Velocity calls the XWiki Java objects so if you check the javadoc for them you'll see all methods that you can call. $xwiki --> com.xpn.xwiki.api.XWiki $doc --> com.xpn.xwiki.api.Document $context --> com.xpn.xwiki.api.Context The Javadoc/API can be found here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/API Hope it helps, -Vincent PS: Of course the javadoc has too little comments so we need to improve this too.... On Jan 16, 2008, at 9:56 AM, Paul Libbrecht wrote:
I've been looking for a while but I can't seem to find this.
It looks like all documents not only have a name but also a title, which is a more human-readable version (e.g. could contain colons).
But how can I access this from velocity ? I will certainly post an FAQ answer as result as indeed, it *should* be there.
thanks
paul
Cool, I've added http://www.xwiki.org/xwiki/bin/view/FAQ/GetTitle and http://www.xwiki.org/xwiki/bin/view/FAQ/ObjectsInVelocity I have to say that I of course tried to view the javadoc and googled for it and ended up on docjar's version of the javadoc: http://www.docjar.com/docs/api/com/xpn/xwiki/api/Document.html which is completely out-of-date (but there seemed to be no version visible). Someone should tell them something! Finding the javadoc on xwiki.org site wasn't easy either! - searching for it using the newly fixed Lucene search did give me the appropriate DevGuide page (I wasn't aware of this whole space which seems very useful, can we add the intro of todoclass at theserverside?) - it's not linked in the main xwiki.org menu, neither is DevGuide ! (this I leave to admin) paul Le 16 janv. 08 à 10:36, Vincent Massol a écrit :
Hi Paul,
Here's a tip for answering all these questions. Velocity calls the XWiki Java objects so if you check the javadoc for them you'll see all methods that you can call.
$xwiki --> com.xpn.xwiki.api.XWiki $doc --> com.xpn.xwiki.api.Document $context --> com.xpn.xwiki.api.Context
The Javadoc/API can be found here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/API
Hope it helps, -Vincent
PS: Of course the javadoc has too little comments so we need to improve this too....
On Jan 16, 2008, at 9:56 AM, Paul Libbrecht wrote:
I've been looking for a while but I can't seem to find this.
It looks like all documents not only have a name but also a title, which is a more human-readable version (e.g. could contain colons).
But how can I access this from velocity ? I will certainly post an FAQ answer as result as indeed, it *should* be there.
thanks
paul
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
Guillaume Lerouge -
Paul Libbrecht -
Vincent Massol