Hi! Caleb James DeLisle wrote:
There are various ways with different levels of code cleanliness since all user names start off with 'XWiki.' you could use $context.getUser().substring(6)
If you're looking for the user's "common name" instead of the user name, you might want to look at $xwiki.getUserName http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwi...
Please, as $context is a class and getUser() is a method of that class, what is .substring()? Let's call *name* to the answer to the previous question. Please, where are the possible *name* that could be used with a given method of a given class? I'm browsing XWiki API looking for a way of doing the same you have proposed with .getUser() but with the name of a document. That is, how to get Document instead Space.Document. For instance, here... #set($results=$xwiki.searchDocuments($query)) #foreach($item in $results) #set ($itemdoc = $xwiki.getDocument($item)) * [$itemdoc>$itemdoc], ~~$itemdoc.display('Genrus') $itemdoc.display('Species')~~<br/> $itemdoc shows Space.Document. How do I get just Document? Please, excuse me if this questions are too basic! Thanks for your help! -- Ricardo RodrÃguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems