[Zope] Acquisition from a DTML method in a subdirectory
Troy Farrell
troy at entheossoft.com
Sun Mar 7 16:52:58 EST 2004
Try changing Adtml_doc to
<dtml-var expr="B.Bdtml_method(_.None,_)">
If that solves the problem, a zopista greater than I can explain why. If not,
all I can say is that I don't use DTML any more :(
Troy
Jim Anderson wrote:
>
> I'm running Zope 2.7.0 on a windows platform and
> I have a DTML method referenced in a subdirtory
> from a DTML document object. I want to run
> and external method from the DTML method, but
> Zpublisher is giving me an error message that
> the external method resource is causing
> a name error and the external method is not
> defined.
>
> My ZMI structure looks like this:
>
> root
> |
> A
> |
> Adtml_doc
> Aext_method
> B
> |
> Bdtml_method
>
> Adtml_doc has the following code:
>
> <dtml-var expr="B.Bdtml_method()">
>
> Bdtml_method has code that calls Aext_method
> in A:
>
> Hi!
> <dtml-var expr="Aext_method()">
> Bye!
>
>
> If I run the 'view' tab for Bdtml_method, the method
> runs as expected and if I assume that the method returns
> 'Good', my output is:
>
> Hi!
> Good
> Bye!
>
> If I run Adtml_doc, I then get the error
> message that Aext_method
> is not defined. If I place a copy of Aext_method
> in the B, and run Adtml_doc, I still
> get an error message.
>
> I was expecting that the Bdtml_method would find
> Aext_method by aquiring it from the A, but
> this does not seem to be the case.
>
> So it seems that calling a dtml method in a subdirectory
> does not acquire from the subdirectory or the current
> directory? Can anyone explain this?
>
> More importantly what is the proper way to call
> an external method from a dtml method being
> referenced in a subdirectory?
>
>
> Jim Anderson
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
--
And the glory of the LORD shall be revealed, and all flesh shall see it
together: for the mouth of the LORD hath spoken it.
Isaiah 40.5
More information about the Zope
mailing list