Hello,

On Tue, Apr 26, 2011 at 2:01 AM, <li...@yhmail.de> wrote:

> Hello,
>
> I hope everyone had a chance to enjoy their long weekend.
> I still have problems with my "Menu" Panel.
> In order to have a starting point, I took the code from
> "
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Structured+Document+Index
> "
>
> and pasted it into a new panel. Then I made some changes. Currently it
> looks like this:
> #panelheader('Menu')
>
> #macro(getChildrenOf, $docName, $level)
>   #set($level = $level + '*')
>   #foreach($name in $xwiki.searchDocuments('where doc.parent = ? or
> doc.parent = ? order by doc.name', [$docName, "xwiki:$docName"]))
>     $level [[$name]]
>     #getChildrenOf($name, $level)
>   #end
>   #set($level = $level.substring(0,$mathtool.add($level.length(),-1)))
> #end
>
> #set ($hiddenSpaces = ["Admin", "AnnotationCode", "ColorThemes",
> "Invitation", "Panels", "Scheduler", "Stats", "XWiki"])
>
> #foreach($space in $xwiki.spaces)
>   #if (!$hiddenSpaces.contains($space))
>     #set($WebHome = $space + ".WebHome")
>     [$space]
>     * [${space}.WebHome]
>     #getChildrenOf($WebHome, '*')
>   #end
> #end
> #panelfooter()
>
> Unfortunally the result is more then devastating. The only thing which
> is working is the indentation.
> Especially the links are weird. They all have a "]" in the end.
>

Your panel page has set the syntax as being 1.0.
This is why, either you change the page syntax to 2.0 (
http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing#HChoosingaSyntax)
and put everywhere [[pageName]] instead of [pageName], or you replace the
following line:
$level [[$name]] ## link written in 2.0 syntax
with
$level [$name]   ## link written in 1.o syntax

Raluca.


>
> I would really appreciate it if someone could take a few minutes to
> look over my mistakes and help me setting up a Menu-Panel.
>
> It would also be interesting how you set up your navigation? Only
> trough links? Maybe someone has a script which he/she is willing to
> share with me?
>
> Thanks a lot,
>
> Stephanie
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to