Page Templates are easier to use instead of DTML.
True, but this is just starting off, to make sure it works.
> File
> "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/dt_var.py",
> line 207, in render
> raise KeyError(name)
>KeyError: u'date'
>
> Any idea what I could be doing wrong ? No dtml tag I use seems to
> work - all throw an error.
This error says that there is nothing known as "date".
"date" was just a DHTML page that had a static string saying 'this would be a date'.
Have you defined it anywhere?
If you just want to show the current date, try:
<dtml-var expr="DateTime()">
Yep, even that doesn't work (see below). Oddly, when I created a page with pure HTML as index_html at the very top level, it didn't get seen as an index page. I just get a management view when I go to the top level port.
Traceback (most recent call last):
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/publisher/publish.py", line 138, in publish
result = publication.callObject(request, object)
File "/tmp/Zope- 3.2.1/build/lib.linux-i686-2.4/zope/app/publication/zopepublication.py", line 161, in callObject
return mapply(ob, request.getPositionalArguments(), request)
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4 /zope/publisher/publish.py", line 113, in mapply
return debug_call(object, args)
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/publisher/publish.py", line 119, in debug_call
return object(*args)
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/app/dtmlpage/browser.py", line 26, in index
return template.render(REQUEST, **kw)
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/app/dtmlpage/dtmlpage.py", line 49, in render
return self.template(self.__parent__, request, REQUEST=request, **kw)
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/untrusted/untrusted.py", line 66, in __call__
ProxyFactory(mapping),
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/dt_string.py", line 484, in __call__
result = render_blocks(self._v_blocks, md)
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4 /zope/documenttemplate/pdocumenttemplate.py", line 282, in render_blocks
section = section(md)
File "/tmp/Zope-3.2.1/build/lib.linux-i686-2.4/zope/documenttemplate/dt_util.py", line 86, in eval
d)
File "UntrustedHTML", line 1, in <_expression_>
NameError: name 'DateTime' is not defined
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )