[Zope] Is there a better way to code this?

Luke Tymowski ltymowski@attglobal.net
Mon, 03 Jul 2000 21:00:42 -0400


Hello Dieter,

>What about
>
><dtml-with "_.namespace(standard_html_header='',
>                         standard_html_footer='')">
>    ... your code without "REQUEST" mangling ...
></dtml-with>
>
>This redefines "standard_html_header/footer" inside the "with".
>Should work for DTML methods/documents.

It didn't work.

If I removed all my request mangling from the header and footer code, and 
from the index.html looping code, Zope generates an error:
Zope Error
Zope has encountered an error while publishing this resource.
Error Type: AttributeError
Error Value: __call__


If I leave my request mangling in the header and footer code, but do what 
you suggest above, it works, except that the footer code is inserted after 
the very first record retrieved, and once again at the end of the document 
where it should appear.

I suppose if I don't want hacks, as Andrew suggested, I should do a proper 
job of separating formatting from data.

Luke