Why dont you try the following in a dtml method: <dtml-if "condition"> <dtml-var finlenumer1.html> <dtml-else> <dtml-var thotherfile.html> <dtml-if> this is of course assuming that the files are Zope objects via a LocalFS or External File or File. If they are not and you dont have DTML content at all in them: use a <dtml-call "RESPONSE.redirect(file.html)"> instead of the dtml-var If you HAVE to use th Python script then just the boolean result of the condition to the document and then do the above. So condition above is a python script that returns a true of false. HTH AM Juan Manuel Ruiz Garcia wrote:
Hi,
I have a variable called 'file' that has the name of a DTML/HTML Document tahta exist inside a Folder 'folder'
I want a script to return that DTML document, which name is not known until the end of the script...
Something like this:
if condition: filename='file_numer1.html' else: filename='the_other_file.html'
return "THE DTML CONTENT OF THE 'FILENAME', name of the file in the folder 'ONE_FOLDER'"
is it possible?
_______________________________________________________________ Yahoo! Messenger Nueva versión: Webcam, voz, y mucho más ¡Gratis! Descárgalo ya desde http://messenger.yahoo.es
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- ================================================================== 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 ==================================================================