I have a folder which contains text/html files.

I use a dtml method on a file to display a file's contents using <dtml-var "this()">. It works great.

So the user's browser is here: http://domain.com/folderA/file04/dtml_method

What I need is a way to get the contents of file01, file02 & file03 while the user remains at the above url.

I've been trying to do this via an [internal] python script. Within the dtml_method script i call the python script -passing it the name of the folder (folderA) and the name of the current file (file04).

I use the folderA to create a folderObject (not shown) which I use to access and iterate through the files therein (line 1). Then I check to make sure the current file is not file04 (line 2). Then I append some file-specific properties to a list (used to create links and descriptions) (lines 3-5). I would also like to append the file contents or a portion of the file contents in string form (line 6) but what i have tried has not worked.

line 1:     for obj in folderObj.objectValues('File'):
line 2:          if obj.fileName != file04:
line 3:               r.append([obj.fileName, obj.location])
line 4:               r.append([obj.fileName, obj.date])
line 5:               r.append([obj.fileName, obj.creator])
line 6:               r.append([obj.fileName, obj.??????])




More photos; more messages; more whatever. Windows Live Hotmail - NOW with 5GB storage. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to