[Zope] get dtml content from script

AM list_subscriber@neurobs.com
Fri, 08 Nov 2002 11:22:42 -0800


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 Loca=
lFS=20
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 t=
he=20
condition to the document and then do the above. So condition above i=
s a=20
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 Doc=
ument
>tahta exist inside a Folder 'folder'
>
>I want a script to return that DTML document, which name is not know=
n until
>the end of the script...
>
>Something like this:
>
>if condition: filename=3D'file_numer1.html'
>else: filename=3D'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=F3n: Webcam, voz, y mucho m=E1s =A1Gratis!=20
>Desc=E1rgalo 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 -=20
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
> =20
>

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