[Zope] TAL and Zclasses

Henny van der Linde linde at inline-info.nl
Wed Dec 3 19:59:05 EST 2003


Hi,

I asked this to weeks ago and didn't get any respons so I try again. I couldn't 'find it anywhere.


Till now I did everything with dtml, external python scripts, python scripts and zclasses.
Gradualy I want to switch over to pagetemplates and external python products.

The first thing I want to do is converting the dtml to pagetemplates in the actual sites. These sites are based on a lot of Zclasses.
For instance:


<dtml-with batest>
 <dtml-var index_html>
</dtml-with>

Where batest is an instance of a basic element of our content management system.

After reading zpt docs (Zopebook and docs on devshed), searching in the mailing list archives I came to the following equivalent: 

 <tr><td tal:define="batest here/batest" tal:content="batest/index_html"></td></tr>

This only works in the way that it can find the index_html method (dtml) in the Zclass batest is an instance of. It won't render (it won't find) the other dtml-methods or any other object in the Zclass wich the index_html calls.

So how do I do a 'dtml-with' in tal?
Somebody asked the same question a couple of months ago but I couldn't find an answer in the mailing list archives. 

Regards,

Henny van der Linde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zope/attachments/20031204/1e72f845/attachment.html


More information about the Zope mailing list