[xwiki-users] Panel coding.
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. 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
Re: [xwiki-users] Panel coding.
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
Re: [xwiki-users] Two Newbie Questions
Hello, On Fri, Apr 22, 2011 at 5:56 PM, Robb Sands rsa...@wavecorp.com wrote: I should have been more specific. I have created a new page named books while I was on a page named section 1. books should be under section 3. I know that I can create a link to books on the section 3 page, but when I have opened the books page, the bread crumbs show section 1. I want the bread crumbs to show section 3. Is there a way to do this? This is about setting the right parent for the books page. Each page can have a parent page. This parent page can be a page under a certain space and its name is like: 'SpaceName.PageName', or the home page of a space and its name is like: 'SpaceName.WebHome'. By default, the breadcrumbs contain the titles of the pages. If a page included in the breadcrumb does not have a title, then the breadcrumb will contain the name of that page. I suppose that 'books', 'section 1' and 'section 3' are page names. Let's say that all these pages are in the space 'SpaceName' (- full page names are: 'SpaceName.books', 'SpaceName.section 1', 'SpaceName.section 3' and the URLs are like: 'http://servername/bin/view/SpaceName/books', ' http://servername/bin/view/SpaceName/section 1', ' http://servername/bin/view/SpaceName/section 3'). What you have to do is to set the parent of 'SpaceName.books' as being 'SpaceName.section 3' . See here more information about how to set the parent for a certain page: http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing#HSettingthepageparent. Raluca. Also there was an additional question regarding FAQ's. Is this working as designed, or is there a way to have the question display in the faq.question column instead of faq.emptyvalue? Thanks again for your help. Robb On 4/22/2011 3:30 AM, Marius Dumitru Florea wrote: Hi Robb, On 04/21/2011 05:48 PM, Robb Sands wrote: Hello, Is it possible to move pages around within a space, or only from one space to another? Sure. Move is equivalent to Rename. In XE 3.0 you go to a page, choose Rename from the Page top menu, keep the space unchanged and just modify the page name, hit the Rename button and you're done. Hope this helps, Marius I followed the FAQ tutorial, and for the most part it is working fine. However under faq.question we are seeing faq.emptyvalue. What did I do wrong? Thanks for your assistance. Robb ___ 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 -- *Robb Sands* *| WAVE Corporation | **www.wavecorp.com* http://www.wavecorp.com/* | 407.585.0250* /Manage your Content, Publish your Ideas/ ___ 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