Re: [Zope] Passing args to PageTemplateFile instances

2005-09-24 Thread Peter Bengtsson
2005/9/23, Anders Bruun Olsen [EMAIL PROTECTED]: On Fri, Sep 23, 2005 at 12:39:31PM +0100, Peter Bengtsson wrote: RESULT: --- Welcome to testprod {'args': (TestProd at /test/testprod used for /test/testprod, HTTPRequest,

Re: [Zope] Passing args to PageTemplateFile instances

2005-09-23 Thread Peter Bengtsson
manage_main = PageTemplateFile(templates/mainTestProd, globals()) index_html = PageTemplateFile(templates/indexTestProd, globals()) test = PageTemplateFile(templates/test, globals()) def __init__(self, id, title): self.id = id self.title = title def

Re: [Zope] Passing args to PageTemplateFile instances

2005-09-23 Thread Peter Bengtsson
2005/9/23, Anders Bruun Olsen [EMAIL PROTECTED]: Why the extra self-wrapping. Do it this way: def testit(self, REQUEST=None): return self.test(self, self.REQUEST, something=blah) Then you'll be able to use: span tal:replace=options/something/ Thanks, I have now tried

Re: [Zope] Passing args to PageTemplateFile instances

2005-09-23 Thread Anders Bruun Olsen
On Fri, Sep 23, 2005 at 12:06:00PM +0100, Peter Bengtsson wrote: Please press Reply-All and not just to me. Sorry about that. That is the correct way of calling PageTemplateFile objects in python code. I've got it working in many places. The error must be either a new zope bug or something

Re: [Zope] Passing args to PageTemplateFile instances

2005-09-23 Thread Peter Bengtsson
RESULT: --- Welcome to testprod {'args': (TestProd at /test/testprod used for /test/testprod, HTTPRequest, URL=http://localhost:8080/test/testprod/test_testprod), 'something': 'blah'} 0 /test/testprod

Re: [Zope] Passing args to PageTemplateFile instances

2005-09-23 Thread Anders Bruun Olsen
On Fri, Sep 23, 2005 at 12:39:31PM +0100, Peter Bengtsson wrote: RESULT: --- Welcome to testprod {'args': (TestProd at /test/testprod used for /test/testprod, HTTPRequest, URL=http://localhost:8080/test/testprod/test_testprod), 'something': 'blah'} 0

[Zope] Passing args to PageTemplateFile instances

2005-09-22 Thread Anders Bruun Olsen
Hi, I have read some posts about this before, but the solutions given there does not seem to work for me. The deal is that I would like to make a product where amongst other things there needs to be a search feature. I then make a method that takes input from a form with searchwords but then I