I'm building a custom panel for my Xwiki (Cloud hosted). I need to do a hierarchy tree on my panel, and for that, I need to know the parent of a space, so I can do an #if clause...
#set ($spaces = $xwiki.spaces)
#set ($hiddenSpaces = ["XWiki", "Admin", "Panels", "Blog", "Main"])
#foreach ($space in $spaces)
Here.. how can I achieve something like '$space.parent', that works on a doc????
Like I said I have tried with $space.parent, but this is not working.. it just prints it out on my screen...
Please, I'm stuck on this
EDIT: I think the objects returned by $xwiki.spaces are Strings... is there a way to get a space from the xwiki, something like $xwiki.getSpace($space).parent?