Everything is more or less simple - when you invoke method by <dtml-var meth1> - that "mapping" _ and "client" _.None are passed automagically :) when you invoke method with explicit arguments like <dtml-var "meth1()">, you have to pass those two explicitly like <dtml-var "meth1(_,_.None,...)"> details are here: http://lists.zope.org/pipermail/zope/2000-January/017687.html ----- Original Message ----- From: "Johan Carlsson" <johanc@torped.se> To: <zope@zope.org> Sent: Thursday, June 01, 2000 12:43 AM Subject: [Zope] The funny _.None,_ feature in DTML kind of question
Hi, This feature really bugs me so I thought I write a Tips (or HOWTO). But I need some help. (Also I believe it's documented somewhere, but I cant figure out where...)
When calling the a DTML-method the second time in a row the namespace just disapears.
Using _.None and _ as begining arguments make it all work again.
The questions are: -Why does DTML act like this, is there a logical explanition? -Where is this documented? (I know I say it somewhere) -What would be the best way to name and categorise this "feature".
Best Regards, Johan Carlsson
If you understand my brief problem description, here's a scenario:
In /folder1 there is three DTML-methods: meth1, meth2 In /folder1/folder2 there is a fourth DTML-method: meth3
/folder1/meth1: <dtml-with folder2> #changes the namespace <dtml-call "meth3()"> # works just fine </dtml-with>
/folder1/meth2: <dtml-call "meth1()"> #doesn't work
/folder1/folder2/meth3: <dtml-var "'hällå wörld'"> # or something useful like hello foobar
Solution:
In /folder1 there is three DTML-methods: meth1, meth2 In /folder1/folder2 there is a fourth DTML-method: meth3
/folder1/meth1: <dtml-with folder2> #changes the namespace <dtml-call "meth3(_.None,_)"> # works just fine </dtml-with>
/folder1/meth2: <dtml-call "meth1(_.None,_)"> #works like a working thing
/folder1/folder2/meth3: <dtml-var "'hällå wörld'"> #or something useful like hello foobar (oh, it the same...)
_______________________________________________ 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 )