Thanks Jean-Vincent it works. Two more questions. 1) On the API ( http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D1.3...) it says that the method getWeb is deprecated and that we should use getSpace. But when I do the following it doesn't work (doc.space instead of doc.web) : #set($query="where doc.*space*='Main'") #set($results = $xwiki.searchDocuments($query, 5, 0)) #foreach ($item in $results) * $item <br/> #end Looking at the API this should work no ? 2) the code ** $item <br/>* just gives me the title of the page, and what if I want to include the entire content of each page. How can I do that ? Thanks, Antonio 2008/5/15, Jean-Vincent Drean <[email protected]>:
On Thu, May 15, 2008 at 6:33 PM, Antonio Goncalves <[email protected]> wrote:
so I've tried several queries but in vain. I would like to do something
like
that :
#set($query="where spaces='MySpace'") #set($results = $xwiki.searchDocuments($query, 5, 0)) #foreach ($item in $results) * $item <br/> #end
Any idea ?
Hi,
You can try this :
#set($query="where doc.web='Main'") #set($results = $xwiki.searchDocuments($query, 5, 0)) #foreach ($item in $results) * $item <br/> #end
Other examples are available here : http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples
-- Jean-Vincent Drean _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- -- Antonio Goncalves ([email protected]) Software architect Paris JUG leader : www.parisjug.org Web site : www.antoniogoncalves.org Blog: jroller.com/agoncal LinkedIn: www.linkedin.com/in/agoncal