Re: [Zope] acquisition / dtml-with problem
Paul Winkler writes:
OK, I have a dtml document called "Foo". This works fine when I view the document. Now let's say this document is in the folder called FooFolder in which there is a folder called SubFolder. Now I can call Foo_dtml as either FooFolder/Foo_dtml, or as FooFolder/SubFolder/Foo_dtml through the magic of acquisition. No problem so far, all is good.
Here's the problem. If I put this code in Foo_dtml: <dtml-with images> <dtml-var izea-sundial.jpeg> </dtml-with>
.... it works fine when called as FooFolder/Foo_dtml but NOT when called as FooFolder/SubFolder/Foo_dtml . WHen I do the latter, I get this:
Traceback (innermost last): (SNIP) File /home/pw/Downloads/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
/home/pw/Downloads/Zope-2.2.2-src/lib/python/DocumentTemplate/DT_With.py, line 132, in render (Object: images) AttributeError: (see above)
Why? It seems like dtml-with is unable to find my images folder?? I tried to reproduce your problem (Zope CVS) but was unable. Everything works as expected.
Are you sure that "Foo_dtml" is a DTML Document (and not a DTML Method)? If it would be a DTML Method, then it might find an "images" in "Subfolder" which does not contain your image. Dieter
Dieter Maurer wrote:
I tried to reproduce your problem (Zope CVS) but was unable. Everything works as expected.
Well, OK, that makes two reasons so far to upgrade my Zope distribution, I guess it's time to do it.
Are you sure that "Foo_dtml" is a DTML Document (and not a DTML Method)? If it would be a DTML Method, then it might find an "images" in "Subfolder" which does not contain your image.
It's definitely a DTML Document, and anyway, there are no folders within Subfolder. Thanks for the help, everyone! -- ................. paul winkler .................. slinkP arts: music, sound, illustration, design, etc. web page: http://www.slinkp.com A member of ARMS: http://www.reacharms.com
participants (2)
-
Dieter Maurer -
Paul Winkler