Re: [xwiki-users] How to list the subspace under the space?
Hi, I've used the code snippet included in this thread to display a list of sub-spaces and pages under a space and seems to work very well. However, if Admin has created a page within s space then, normal users will not see the Admin created pages (even though they have access rights to these pages and can browse to them directly). I am guessing that this might be the search documents query within the code snippet not returning results of pages created by Admin? (I am new to all things xwiki/velocity/etc so I am really guessing here!) Is there any way to modify the code snippet to allow normal users to see all children pages of a space for which they supposedly have access rights? Thanks in advance for any help on this. Regards, PM ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to list the subspace under the space?
I hadn't seen that. Thanks for sharing. -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-list-the-subspace-under-the-space-Little-bit-successful-need-more-steps-to-Go-tp5095367p5130817.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to list the subspace under the space?
Hi, On Wed, Jun 2, 2010 at 00:21, xManish wrote: > > Hi Guillaume, > Can you explain in little bit detail on how to obtain the > *Space > *Page >*SubPage > hierarchy in Xwiki? > It works out of the box using parent page <-> child page relationships. Create a new space from the "XWIKI" menu at the top left, then from the homepage of that space create a new page from the menu that will have the name of your space (still at the top left). Then from that page create a new page, again from the top menu. This will automatically create a parent <-> child relationship between your pages. Now go to Main.AllDocs and look at the "Tree" tab -> you'll see the hierarchy. Guillaule > Thanks, > Manish > -- > View this message in context: > http://xwiki.475771.n2.nabble.com/How-to-list-the-subspace-under-the-space-Little-bit-successful-need-more-steps-to-Go-tp5095367p5128311.html > Sent from the XWiki- Users mailing list archive at Nabble.com. > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > -- Guillaume Lerouge Sales - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to list the subspace under the space?
Hi Guillaume, Can you explain in little bit detail on how to obtain the *Space *Page *SubPage hierarchy in Xwiki? Thanks, Manish -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-list-the-subspace-under-the-space-Little-bit-successful-need-more-steps-to-Go-tp5095367p5128311.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to list the subspace under the space? Little bit successful. Need more steps to go..
Hi Guillaume, Thanks for your valuable reply. I have somewhat achieved to get the subspaces and pages like a tree structure. This is the code snippet. I just changed the query in the child parent code snippet for my requirement. {{velocity}} #macro (createDocumentTree $document $depth $level) #if ($depth > 0) #set($translated = $document.getTranslatedDocument()) #set($name = $translated.getName()) #set($fullname = $translated.getFullName()) #set($prefixed = $translated.getPrefixedFullName()) #set($where = "where doc.parent = '$name' or doc.parent = '$fullname' or doc.parent = '$prefixed' order by doc.name") #if ($name == "WebHome") #set($space = $document.getSpace()) ## changes made here for our requirement #set($where1 = "where doc.parent = '$fullname' and doc.name='WebHome'") #end #foreach($name in $xwiki.searchDocuments($where)) #if ($xwiki.getDocument($name)) #set($document = $xwiki.getDocument($name)) #set($translated = $document.getTranslatedDocument()) #set($prefixed = $translated.getPrefixedFullName()) #set($title = $translated.getDisplayTitle()) #set($indent = "") #foreach($n in [1..$level]) #set($indent = "${indent}*") #end $indent [[$title>>$prefixed]] #set($depth = $depth - 1) #set($level = $level + 1) #createDocumentTree($document $depth $level) #set($depth = $depth + 1) #set($level = $level - 1) #end #end #end #end #createDocumentTree($doc 5 1) {{/velocity}} But here i am facing the problem. I am creating a space and putting this velocity code in that space and its displaying the whole tree structure related to it. But i want this code in panel and the tree structure should come for all spaces dynamically like Tree view Navigation. I put this code in panel but it displaying the tree related to panel. My requirement is to show all spaces and its related subspace, pages as tree in panel. How can i get spaces and also specify the proper document object? Is there any way to get successful in this. Kindly guide me. Thanks in Advance. Regards, Nithya. -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-list-the-subspace-under-the-space-tp5095367p5104916.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How to list the subspace under the space?
Hi, On Mon, May 24, 2010 at 21:17, Nithya Vembu wrote: > > Hi All, > > Currently i am working in xwiki and facing some issues which i am not able > to solve. I want to create a tree structure for the space and subspace and > the pages inside it. > > Eg : I am creating > > Space Name : HelloMajor, Parent : nothing (by default it takes WebHome) > Page Name : HelloMajorPage1 : Parent : HelloMajor > Page Name : HelloMajorPage2 : Parent : HelloMajorPage1 > > If i use document tree its displaying like > >HelloMajor > |___ HelloMajorPage1 > |HelloMajorPage2 > > Another space creation : HelloMinor; Parent : HelloMajor.WebHome > Page Name : HelloMinorPage Parent : HelloMinor > Now i want to display the tree structure like this > > HelloMajor > |___ HelloMajorPage1 > ||HelloMajorPage2 > |___HelloMinorPage > |HelloMinorPage > > > I want to display the subspace under the related space itself. I tried with > child parent snippets but it didnt worked. As i explored i didnt get the > solution to get the parent of the subspace. Normally in db its storing > under > XWD_Parent field in xwiki_doc table. I would like to give the subspace name > as parameter so that i can get the parent name which i mean is > "HelloMajor.WebHome". > > My requirement is to build a tree structure. I tried with space explorer,mk > tree, document tree and spaceAllDocs. No one fitting my requirement. > > *Spacename > * Subspacename >* subspacepages > * SpacePages > At this time XWiki doesn't support nested spaces. However you can achieve this: * Space * Page * SubPage Guillaume In this manner i want to display. IS there any solution. > > Kindly help me. > > Thanks in advance. > > Regards, > Nithya.Vembu. > -- > View this message in context: > http://xwiki.475771.n2.nabble.com/How-to-list-the-subspace-under-the-space-tp5095367p5095367.html > Sent from the XWiki- Users mailing list archive at Nabble.com. > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > -- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] How to list the subspace under the space?
Hi All, Currently i am working in xwiki and facing some issues which i am not able to solve. I want to create a tree structure for the space and subspace and the pages inside it. Eg : I am creating Space Name : HelloMajor, Parent : nothing (by default it takes WebHome) Page Name : HelloMajorPage1 : Parent : HelloMajor Page Name : HelloMajorPage2 : Parent : HelloMajorPage1 If i use document tree its displaying like HelloMajor |___ HelloMajorPage1 |HelloMajorPage2 Another space creation : HelloMinor; Parent : HelloMajor.WebHome Page Name : HelloMinorPage Parent : HelloMinor Now i want to display the tree structure like this HelloMajor |___ HelloMajorPage1 ||HelloMajorPage2 |___HelloMinorPage |HelloMinorPage I want to display the subspace under the related space itself. I tried with child parent snippets but it didnt worked. As i explored i didnt get the solution to get the parent of the subspace. Normally in db its storing under XWD_Parent field in xwiki_doc table. I would like to give the subspace name as parameter so that i can get the parent name which i mean is "HelloMajor.WebHome". My requirement is to build a tree structure. I tried with space explorer,mk tree, document tree and spaceAllDocs. No one fitting my requirement. *Spacename * Subspacename * subspacepages * SpacePages In this manner i want to display. IS there any solution. Kindly help me. Thanks in advance. Regards, Nithya.Vembu. -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-list-the-subspace-under-the-space-tp5095367p5095367.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users