[Zope] dtml-var in URL

Stephan Goeldi Stephan Goeldi" <goeldi@goeldi.com
Mon, 30 Sep 2002 11:20:17 +0200


> <dtml-if "print==yes">

Document Template Parse Error

Expression (Python) Syntax error:
invalid syntax

, for tag <dtml-if "print==yes">, on line 51 of standard_html_header


> or
> <dtml-if "REQUEST.form['print']==yes">

  <H2>Site Error</H2>
  <P>An error was encountered while publishing this resource.
  </P>
  <P><STRONG>KeyError</STRONG></P>

  Sorry, a site error occurred.<p>
<!--
Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 150, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 114, in
publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 159, in
zpublisher_exception_hook
    (Object: www)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 98, in publish
  File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply
    (Object: index_html)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 39, in
call_object
    (Object: index_html)
  File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 127, in __call__
    (Object: index_html)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 473,
in __call__
    (Object: index_html)
  File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 120, in __call__
    (Object: standard_html_header)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 473,
in __call__
    (Object: standard_html_header)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 159, in
eval
    (Object: REQUEST.form['print']==yes)
    (Info: REQUEST)
  File &lt;string&gt;, line 2, in f
  File /usr/local/zope/lib/python/AccessControl/DTML.py, line 32, in
guarded_getitem
    (Object: index_html)
  File /usr/local/zope/lib/python/AccessControl/ZopeGuards.py, line 90, in
guarded_getitem
KeyError: print

-->