Hi Jamie, I need a product similar as ExpansionTree. I've downloaded it and tried. I need your little help for a special case. But first I've to changed your ZPT named et-examples/by-query in your example, to avoid this error: ******************************************************* __traceback_info__: {'path': ['absolute_url'], 'TraversalRequestNameStack': []} TypeError: sequence index must be integer ******************************************************* ******************************************************* line 12: - tal:define="o r.object;url string:${o/absolute_url}/manage_workspace" + tal:define="o python:r.object;url string:${o/absolute_url}/manage_workspace" ******************************************************* Ok, now my really question. In fact I've have the same problem in two cases, and I intend to change your product to answer to it, so I need your help. 1- I have Folders and content as: Members --MemberA ----FileA ( Type A ) ----FileB ( Type B ) --MembreB ----FileC ( Type A ) What I need is to get a tree as: Root: the Type of Members/MemberA/FileA, recognize as a folder root Subfolder (if one exist, not in this case I think) Leaves : FileA,FileC I've tried with some function, but I've still not find anyone. 2- I've a Forum as: Forums --ForumA ---YearX ----MonthX -----DayX ------Post1 ------Post2 (Answer of Post1) -----DayY ------Post3 (Answer of Post1) ------Post4 (Answer of Post2) What I want is a tree as : Root: Title of ForumA Subfolders: PostX (which have answers) Leaves: PostY (without answers) But for this I need to change in a fly the function calling in the setChildChooser's method. Have you any idea of how I'm able to do it? Is there any similar product which does what I need? Cheers PS -------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
Pascal Samuzeau wrote:
But first I've to changed your ZPT named et-examples/by-query in your example, to avoid this error:
******************************************************* __traceback_info__: {'path': ['absolute_url'], 'TraversalRequestNameStack': []} TypeError: sequence index must be integer *******************************************************
******************************************************* line 12:
- tal:define="o r.object;url string:${o/absolute_url}/manage_workspace"
+ tal:define="o python:r.object;url string:${o/absolute_url}/manage_workspace" *******************************************************
That code you've patched doesn't appear in the examples I shipped. The original line says: tal:define="o r/object;url string:... It uses TALES path syntax, not python dot syntax. Unless you changed the code, you shouldn't have gotten that error.
1- I have Folders and content as:
Members --MemberA ----FileA ( Type A ) ----FileB ( Type B ) --MembreB ----FileC ( Type A )
What I need is to get a tree as: Root: the Type of Members/MemberA/FileA, recognize as a folder root Subfolder (if one exist, not in this case I think)
I don't follow this. Draw me an ascii picture of what you want it to look like.
Leaves : FileA,FileC
Sounds like maybe, lambda o: o.objectValues(['Folder','Type A']) But I'm unclear on the type of object MemberA and MemberB are.
Root: Title of ForumA Subfolders: PostX (which have answers) Leaves: PostY (without answers)
But for this I need to change in a fly the function calling in the setChildChooser's method.
Even if posts that have answers are a different type of object than posts that don't have answers, its unlikely you'd need to dynamically alter the child chooser method. Most of time using a child chooser function is as simple as performing various manipulations on the results of methods from the ObjectManager API. I suggest you familiarize yourself with that API thoroughly. -- Jamie Heilman http://audible.transient.net/~jamie/ "Most people wouldn't know music if it came up and bit them on the ass." -Frank Zappa
participants (2)
-
Jamie Heilman -
Pascal Samuzeau