[Zope] DTML vs. DW2 extensions Revisited

Johan Carlsson johanc@torped.se
Sat, 9 Oct 1999 01:18:47 +0200


Wait a minute.
I thought that;

  <dtml-var variablename>

and;

  <dtml-var name="variablename">

was equal.
It doesn't seem to be the case? 
I get the following error-message:

<SNIP>
...
System Unavailable
This site is currently experiencing technical difficulties. 
Please contact the site administrator for more information.  For
additional technical information, please refer to the HTML source for this
page.  Thank you for your patience.
...
<!--
 Error type:  KeyError
 Error value: 'title'
 -->
...
Traceback (innermost last):
  File /home/Zope2/lib/python/ZPublisher/Publish.py, line 214, in publish_module
  File /home/Zope2/lib/python/ZPublisher/Publish.py, line 179, in publish
  File /home/Zope2/lib/python/Zope/__init__.py, line 201, in zpublisher_exception_hook
    (Object: RoleManager)
  File /home/Zope2/lib/python/ZPublisher/Publish.py, line 165, in publish
  File /home/Zope2/lib/python/ZPublisher/mapply.py, line 160, in mapply
    (Object: manage_main)
  File /home/Zope2/lib/python/ZPublisher/Publish.py, line 102, in call_object
    (Object: manage_main)
  File /home/Zope2/lib/python/App/special_dtml.py, line 120, in __call__
    (Object: manage_main)
    (Info: /home/Zope2/lib/python/Products/TMenu/manage_metastructure.dtml)
  File /home/Zope2/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__
    (Object: manage_main)
  File /home/Zope2/lib/python/DocumentTemplate/DT_Var.py, line 238, in render
    (Object: 'title')
KeyError: (see above)
...
</SNIP>

From this line:
<dtml-var name="title" html_quote=1>

But this works fine:
<dtml-var title html_quote=1>

//johan