Hi,
I'm trying to use a dtml tree tag with an
External Method, but it isn't working.
The code that I'm using is:
<dtml-in
obj_fs> -> this is the external
Method
<dtml-tree branches_expr="objectValues(['Folder','External Method'])"
assume_children=1>
<dtml-var sequence-item>
</dtml-tree>
</dtml-in>
And the code in obj_fs
is:
def
obj_fs(self):
import os, os.path
lst=os.listdir("/var/spool/news/articles")
return lst
What I'm trying with this, is that the zope
programme go get me the folders in the directory "/var/spool/news/articles",
show those folders and with the tree, it will appear a plus sign that when we
click on this plus sign, it will display the subfolders in the folder that we
have clicked.
The result must be like the Windows Explorer,
with folder and subfolders.
Is the tree tag compatible with the External
Method? If yes, this is not working. Can anyone help me to figure where is the
error and tell me another way to can make this result?
Thanks,
Pedro