[Zope 1.10] grand child inclusion?
I can't seem to be able to include the result of a sub document folder in its grand parent folder. This is my current configuration: folderA/ DTMLMethod1 folderB/ DTMLMethod2 If I call <!--#var "folderB.DTMLMethod2"--> in DTMLMethod1, I get the HTML quoted contents of DTMLMethod2. I'd like to have the DTMLMethod2 called instead. What should I do? Note: I also tried <!--#with folderB--><!--#var DTMLMethod2--><!--#/with--> and variations thereof to no avail.
benjamin.ryzman@easynet.fr wrote:
If I call <!--#var "folderB.DTMLMethod2"--> in DTMLMethod1, I get the HTML quoted contents of DTMLMethod2. I'd like to have the DTMLMethod2 called instead.
Is that a direct copy/paste from your page? Try including the () after the method: <!--#var "folderB.DTMLMethod2()"--> to actually call it. Doug
Doug Hellmann wrote:
benjamin.ryzman@easynet.fr wrote:
If I call <!--#var "folderB.DTMLMethod2"--> in DTMLMethod1, I get the HTML quoted contents of DTMLMethod2. I'd like to have the DTMLMethod2 called instead.
Is that a direct copy/paste from your page? Try including the () after the method:
<!--#var "folderB.DTMLMethod2()"-->
to actually call it.
Yes, you're right. I get a NameError, however. DTMLMethod2 seems unable to find the date_list() method, though it works when called directly from folderB (as in the folderB/DTMLMetho2 url).
I realize this reply is 3 weeks late, but I'm +still_ not caught up on the zope lists after my vacation - in fact, I don't think I'm making headway, just barely staying even! Anyway, since noone else has answered Benjamin's question, I thought I'd quote Phillip J. Eby:
When you call a DTML method in an expression from DTML, you must pass "_.None,_" as the first two parameters if you want the current namespace to pass through. Otherwise, [the DTML method you are calling] will not have access to any variables [or methods] other than 'title' and 'body', period.
HTH, Ross On Thu, Oct 07, 1999 at 07:02:27PM +0200, Benjamin Ryzman wrote:
Doug Hellmann wrote:
benjamin.ryzman@easynet.fr wrote:
If I call <!--#var "folderB.DTMLMethod2"--> in DTMLMethod1, I get the HTML quoted contents of DTMLMethod2. I'd like to have the DTMLMethod2 called instead.
Is that a direct copy/paste from your page? Try including the () after the method:
<!--#var "folderB.DTMLMethod2()"-->
to actually call it.
Yes, you're right. I get a NameError, however. DTMLMethod2 seems unable to find the date_list() method, though it works when called directly from folderB (as in the folderB/DTMLMetho2 url).
-- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
participants (4)
-
Benjamin Ryzman -
benjamin.ryzman@easynet.fr -
Doug Hellmann -
Ross J. Reedstrom