[xwiki-users] list of pages within a space
Hello all, Pretty new to xwiki here running 2.7 from war. Just trying to figure some of the basics out. I'm wondering how to list the pages that are under a space. Is there a macro for this? Is there a gadget that will do this? What I'm looking for is something like this[1] under the "Documents in space Skins" heading. [1] http://incubator.myxwiki.org/xwiki/bin/view/Skins/ ------ thanks kevin.foote
I think this will do what you want: {{velocity}} #foreach($subdoc in $xwiki.getSpaceDocsName("$doc.space")) #set($docum = $xwiki.getDocument($subdoc)) #if($docum.name != 'WebHome' && $docum.name != 'WebPreferences') * [[${subdoc}]] #end #end {{/velocity}} The "if" clause only removes the WebHome and WebPreferences pages. Cheers, Luís Braga -- View this message in context: http://xwiki.475771.n2.nabble.com/list-of-pages-within-a-space-tp6060339p606... Sent from the XWiki- Users mailing list archive at Nabble.com.
Thanks Luis That works (quite well) .. now for the UI bit. It seems on the incubator.myxwiki.org site there is also some css that is happening to display great little icons.. and mousover effects. Is this at all possible to achieve within the velocity snip ? Basically I guess it would set a css class type for each [[{$subdoc}]] ------ thanks kevin.foote On Thu, 24 Feb 2011, Lukapt wrote: -> -> I think this will do what you want: -> -> {{velocity}} -> #foreach($subdoc in $xwiki.getSpaceDocsName("$doc.space")) -> #set($docum = $xwiki.getDocument($subdoc)) -> #if($docum.name != 'WebHome' && $docum.name != 'WebPreferences') -> * [[${subdoc}]] -> #end -> #end -> {{/velocity}} -> -> The "if" clause only removes the WebHome and WebPreferences pages. -> -> Cheers, -> -> Luís Braga -> -- -> View this message in context: http://xwiki.475771.n2.nabble.com/list-of-pages-within-a-space-tp6060339p606... -> Sent from the XWiki- Users mailing list archive at Nabble.com. -> _______________________________________________ -> users mailing list -> [email protected] -> http://lists.xwiki.org/mailman/listinfo/users ->
participants (2)
-
Kevin P. Foote -
Lukapt