[Zope] The funny _.None,_ feature in DTML kind of question
Johan Carlsson
johanc@torped.se
Thu, 1 Jun 2000 00:43:45 +0200
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...)