[Zope] simple DTML question ...
Darran Edmundson
Darran.Edmundson@anu.edu.au
Fri, 28 Jan 2000 21:50:59 +1100
It's 12:30 am and I've been Zoping for 15 hours without
a break. I just ran into a problem that can be pared
down to the following example ...
Create a DTML method:
<dtml-var standard_html_header>
<dtml-var "foobar(year='chosen_year')">
<dtml-var standard_html_footer>
and try to render it where foobar is another DTML method:
<input type=text name="<dtml-var year>:int"
value='<dtml-var "ZopeTime()" fmt="%Y">'>
I suspect the source of my misunderstanding can be put
in an even simpler example. If foobar contains only
<dtml-var "ZopeTime()"> then calling foobar via
<dtml-var "foobar"> returns the unevaluated DTML. Why
is this? I wandered through Amos' "Advanced DTML"
How-To but I'm not thinking clearly. I can probably
figure it out tomorrow but I would dearly love to awake
in the morning and find the source of my confusion
awaiting in my Inbox.
Cheers,
darran.
Traceback follows:
Traceback (innermost last):
File D:\Zope\ZopeSite1\lib\python\ZPublisher\Publish.py, line 214, in
publish_module
File D:\Zope\ZopeSite1\lib\python\ZPublisher\Publish.py, line 179, in
publish
File D:\Zope\ZopeSite1\lib\python\Zope\__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
File D:\Zope\ZopeSite1\lib\python\ZPublisher\Publish.py, line 165, in
publish
File D:\Zope\ZopeSite1\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: t4)
File D:\Zope\ZopeSite1\lib\python\ZPublisher\Publish.py, line 102, in
call_object
(Object: t4)
File D:\Zope\ZopeSite1\lib\python\OFS\DTMLMethod.py, line 145, in __call__
(Object: t4)
File D:\Zope\ZopeSite1\lib\python\DocumentTemplate\DT_String.py, line 502,
in __call__
(Object: t4)
File D:\Zope\ZopeSite1\lib\python\DocumentTemplate\DT_Util.py, line 335,
in eval
(Object: foobar(year='chosen_year'))
(Info: foobar)
File <string>, line 0, in ?
File D:\Zope\ZopeSite1\lib\python\OFS\DTMLMethod.py, line 141, in __call__
(Object: foobar)
File D:\Zope\ZopeSite1\lib\python\DocumentTemplate\DT_String.py, line 502,
in __call__
(Object: foobar)
File D:\Zope\ZopeSite1\lib\python\DocumentTemplate\DT_Var.py, line 278, in
render
(Object: ZopeTime())
File D:\Zope\ZopeSite1\lib\python\DocumentTemplate\DT_Util.py, line 335,
in eval
(Object: ZopeTime())
(Info: ZopeTime)
File <string>, line 0, in ?
NameError: (see above)