[Zope] LocalFS and <dtml-tree>

Aseem Mohanty aseem@neurobehavioralsystems.com
Fri, 19 Jul 2002 02:48:31 -0700


Some more details:

I tried the following different ways:

<dtml-tree name="REQUEST.tree_folder" branches="fileValues">
  <dtml-var getId>
</dtml-tree>

and I get just a list of folders in the folder REQUEST.tree_folder.

<dtml-tree name="REQUEST.tree_folder">
  <dtml-var getId>
</dtml-tree>

I get nothing just a blank page

<dtml-tree name="REQUEST.tree_folder" branches_expr="fileValues()">
  <dtml-var getId>
</dtml-tree>

I get the folders with little '+' signs infront of them but expansion is 
erratic (sometimes it does sometimes it doesnt, one expand click expands 
another node and so on) and then too it only shows the same dir 
structure under it (not the actual one...but the one at the topmost level)

<dtml-tree name="REQUEST.tree_folder" branches_expr="fileValues()" id=id>
  <dtml-var getId>
</dtml-tree>

this is the nearest i have gotten to a proper tree...
all nodes expand out nicely. Only problem is they dont show the true 
contents, they just show the top level contents in themselves (over and 
over again ... infinitely)

 what should I do to get the proper tree??

TIA
AM

Aseem Mohanty wrote:

> Hi ,
>
> I have a LocalFS instance that gives access to a folder on my disk. 
> Now I would like to display the contents of any desired folder in the 
> tree style on a page.
>
> The code that I have is:
>
> <dtml-let tree_root="ex_files_storage[REQUEST.folder]">
>
> <dtml-tree Name=tree_root>
>  <dtml-var getId>
> </dtml-tree>
>
> </dtml-let>
>
> This unfortunately does not display anything, just a blank page.
>
> I also tried the <dtml-tree> tag to be like this:
>
> <dtml-tree Name=tree_root branches="fileValues">
>
> that kind of works in that I only get  list of all folders in the 
> "REQUEST.folder" directory without the + signs that allow you to 
> expand and see if  the folder has any sub-folders, even if they 
> exist... just a list of ids of folders in the requested folder
>
> the reason i tried it the former way first is that LocalFS has the 
> "tpValues" function defined, so I asssumed everything would be great.
>
> What am I doing wrong here?? How can I get a tree view of the contents 
> of the folder in LocalFS??
>
> Finally will the dtml-tree view show individual files in the folders 
> or do I have to specify the leaves parameter and write my own stuff to 
> show that??
>
> TIA
> AM
>

-- 
==================================================================
 Aseem Mohanty							   
 Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 
 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231		  	
==================================================================								  	
 "I saw `cout' being shifted "Hello world" times to the left and  
  stopped right there!!"                        -- Steve Gonedes  
==================================================================