Re: Subclass and Image
drogahn@d.umn.edu writes:
.... 3. <dtml-var testClassInstanceId> from another DTML method or document doesn't work!
It renders to (something like) <classname instance at 1234567> I think that was when I used no base class This is normal:
"dtml-var" renders the object, if it is callable. Otherwise, it converts it into a string. Your instance object is apparently not callable. The "str" function, then, returns "<classname ....>".
.... Now, when I use DTML Method as a base class it works, but dtml variables in the class index_html file aren't interpreted. eg they display as "<dtml-var test>"
Hmm: If you use "<dtml-var your_instance>", the "index_html" is irrelevant. Instead, you should get the rendered content of your DTML in the instance itself (it is a DTML Method, you told us!). If you use "<dtml-var "your_instance.index_html">", then the calling magic does not apply (because in a Python expression, i.e. inside "...", you take over full control -- no more magic!). The "str" applied to a DTML object returns the source html-quoted, as you described. To render "index_html", you should use: <dtml-var "_.render(your_instance.index_html)"> Dieter
hi Dieter, Do you know how to take a fodler that is full of html pages all with sub folders and relative URL's in them and publish the entire thing in Zope? thanks, --mate'
Do you know how to take a fodler that is full of html pages all with sub folders and relative URL's in them and publish the entire thing in Zope?
Maybe that's just me, but you simply have to ftp the folder into zope. Like you'd do with any web server ;-) Philippe
There's also load_site.py, in the utilities directory.
From: Philippe Jadin <all@123piano.com> Date: Fri, 13 Jul 2001 10:30:18 +0200 To: sztipam@vuse.vanderbilt.edu Cc: zope@zope.org Subject: Re: [Zope] assembling website root from filesystem
Do you know how to take a fodler that is full of html pages all with sub folders and relative URL's in them and publish the entire thing in Zope?
Maybe that's just me, but you simply have to ftp the folder into zope. Like you'd do with any web server ;-)
Philippe
_______________________________________________ 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 )
Mate' Sztipanovits writes:
Do you know how to take a fodler that is full of html pages all with sub folders and relative URL's in them and publish the entire thing in Zope? You already read:
* "ftp": there is a Python contribution (--> comp.lang.python archive) that can do recursive up/downloads * "load_site" You have two more options: 1. place a standard WebServer (e.g. Apache) before Zope and let it serve the static content. 2. use "LocalFS" (--> zope.org) to map a filesystem branch into your Zope environment. Dieter
* "ftp": there is a Python contribution (--> comp.lang.python archive) that can do recursive up/downloads
Maybe it is not totally clear to the person asking the question, but you can use any ftp client to upload content in zope like you'd do with any ftp server. This way you can copy (recursively if needed) your complete files tree in zope. Philippe
It renders to (something like) <classname instance at 1234567> I think that was when I used no base class This is normal:
To render "index_html", you should use: <dtml-var "_.render(your_instance.index_html)">
Thanks, that nudged me in the right direction, I found what I needed here http://www.zope.org/Members/lalo/Renderable-ZClass " This is a base class for your ZClasses that makes subclasses renderable, so you can say <dtml-var myobject> (like you can do with images). " I'm still not sure why index_html isn't called by dtml-var in a dtml ZClass by default... so it can be var'ed from a page without those workarounds (no wonder noone likes dtml ZClasses!) Daniel Rogahn
participants (5)
-
Daniel Rogahn -
Dieter Maurer -
marc lindahl -
Mate' Sztipanovits -
Philippe Jadin