Zope 2.3 CVS I have a Python product that calls HTMLFile objects from within other HTMLFile objects. Suppose the first file is: <dtml-var "page_html(this())"> and the second file, page_html, is: <dtml-var REQUEST> &dtml-URL1; I get a KeyError on URL1. If this file is: <dtml-var REQUEST> <dtml-var "REQUEST.URL1"> then it works fine. Any clues? Richard -- Richard Jones richard@bizarsoftware.com.au Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)
richard@bizarsoftware.com.au wrote:
Zope 2.3 CVS
I have a Python product that calls HTMLFile objects from within other HTMLFile objects. Suppose the first file is:
<dtml-var "page_html(this())">
and the second file, page_html, is:
<dtml-var REQUEST> &dtml-URL1;
I get a KeyError on URL1. If this file is:
<dtml-var REQUEST> <dtml-var "REQUEST.URL1">
then it works fine. Any clues?
Of course, the obvious problem was that I was calling the page_html incorrectly. I remember years ago when I was using DTML under Bobo that I ran into this exact same problem, and Jim Fulton pointed out the error of my ways. Of course, it's all still black magic, and Jim's elsewhere, so I hadda delve into the DocumentTemplate source to find the solution myself. Four head-hurting hours later, the solution is: <dtml-var "page_html(REQUEST)"> And all is made better. Richard -- Richard Jones richard@bizarsoftware.com.au Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)
participants (1)
-
richard@bizarsoftware.com.au