[xwiki-users] XWiki Variable's list
Where can I see the name of all the default variables used by xwiki, for example, the user name, e mail, etc. Thanks a lot -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-Variable-s-list-tp5481740p5481740.ht... Sent from the XWiki- Users mailing list archive at Nabble.com.
The user name is available through $xcontext.getUser() The other user information is not stored in variables, you can get it by loading the user's document and getting the user object from it: #set($userObj = $xwiki.getDocument($xcontext.getUser()).getObject('XWiki.XWikiUsers')) $userObj.getProperty('first_name') For a list of properties of the user object (eg: 'first_name') go to yourwiki/xwiki/bin/view/XWiki/XWikiUsers For more information about other variables and scripting in general you can check: http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting Caleb abrante wrote:
Where can I see the name of all the default variables used by xwiki, for example, the user name, e mail, etc. Thanks a lot
Hello, The XWiki default variables are defined in 'xwikivars.vm' template under '/xwiki/templates/' directory ( http://servername/xwiki/templates/xwikivars.vm ). You can also check out the 'macros.vm' template. You'll find there a lot of useful Velocity macros. And there is also the XWiki Platform API (http://platform.xwiki.org/xwiki/bin/view/DevGuide/API - see the Javadoc for the latest stable release). Raluca. On Tue, Aug 31, 2010 at 11:56 AM, abrante <[email protected]> wrote:
Where can I see the name of all the default variables used by xwiki, for example, the user name, e mail, etc. Thanks a lot -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-Variable-s-list-tp5481740p5481740.ht... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
abrante -
Caleb James DeLisle -
Raluca Stavro