Re: [Zope] where are you sticking site-wide methods/resources ? (too manyDTML-WITH's) DTML-WITH's)
-----Original Message----- From: chas <panda@skinnyhippo.com> To: Phil Harris <phil@philh.org>; zope@zope.org <zope@zope.org> Date: Wednesday, September 29, 1999 6:26 AM Subject: RE: [Zope] where are you sticking site-wide methods/resources ? (too manyDTML-WITH's) DTML-WITH's)
At 08:38 AM 9/29/99 +0100, Phil Harris wrote:
Couldn't you just do something like (untested)
<dtml-var "Imports.folder.method()">
One of the first things I tried as I remember. Worked OK for simple methods but for more complex methods :
a) variables kept disappearing (which means I really don't grok this acquisition business yet).
b) the DTML method could no longer 'import' other things.
Try this: <dtml-var "Imports.folder.method(_.None, _)"> This will pass the namespace to the method, and possibly fix a & b above... Kevin
<dtml-var "Imports.folder.method()">
One of the first things I tried as I remember. Worked OK for simple methods but for more complex methods :
a) variables kept disappearing (which means I really don't grok this acquisition business yet).
b) the DTML method could no longer 'import' other things.
Try this:
<dtml-var "Imports.folder.method(_.None, _)">
This will pass the namespace to the method, and possibly fix a & b above...
I read that line of code you wrote and smiled/laughed to myself because : a) Just how intuitive is '_.None, _' ? b) Where on earth do you dig all this stuff up from ? I swear you've got different documentation from everyone else. You must live in the source. c) I knew it would work. After all, it's you again :) And work it did. You're a freaking nutter, Kevin, and thank god you're on our side :) Thanks indeed. chas
participants (2)
-
chas -
Kevin Dangoor