list of pages/spaces

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

list of pages/spaces

Bubulina
Hello

I know that this code retrieves all the documents: $xwiki.getSpaceDocsName($doc)
my question is this: is it possible to specify which documents can be left unwritten in the list?
for instance if i have these spaces: Website1, Website2, XWiki, Main etc and i don't wanna show "XWiki, Main", how can i approach this in velocity code?

Thanks





Take care ,
    Gabriela Radu :)
www.gabrielaradu.com


       
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: list of pages/spaces

Tronicek


Hi,

for example take a look at XWiki.Treeview page (http://.../XWiki/Treeview?xpage=code [http://.../XWiki/Treeview?xpage=code]).
There is seen how to handle "hiddenSpaces" or "hiddenPages" in a loop over documents.

Maybe choose an other API function instead of $xwiki.getSpaceDocsName or extract unwanted spaces before using this function like:

#set($hiddenSpaces = ["XWiki","Main"])
#if (!$hiddenSpaces.contains($doc.web))
 #foreach($page in $xwiki.getSpaceDocsName($doc))
 ## ...your code here...
 #end
#end

 

>Hello

>I know that this code retrieves all the documents: $xwiki.getSpaceDocsName($doc)
>my question is this: is it possible to specify which documents can be left unwritten in the list?
>for instance if i have these spaces: Website1, Website2, XWiki, Main etc and i don't wanna show "XWiki, Main", how can i approach this in velocity code?

>Thanks


       
EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
Homepage mit eigenem Namen. Jetzt starten! *http://unddu.de/?kid=kid@mf2* [http://unddu.de/?kid=kid@mf2]
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users