--On 28. September 2007 15:55:29 +0100 kamal hamzat <[EMAIL PROTECTED]> wrote:
I have been having issue converting this code in DTML to ZPT.
<dtml-in "news.zCatNewsCurrent()">
<dtml-let article=absolute_url>
<dtml-if expr="_.int(article[46:48]) < 5">
<div> <a href="<dtml-var expr="article[0:48]">" class="link3">
<dtml-var title>
</a><dtml-var author> <br>
<font class="text1"> <dtml-var summary> </font>
<a href="<dtml-var expr="article[:48]">" class="link5">
details
</a>
<br><br>
</div>
</dtml-if>
</dtml-let>
</dtml-in>
This code is too ugly in order to think about a proper migration. You write a python script that prepares the data to rendered. You can the script from the ZPT and iterate over the results using tal:repeat. tal:content is your friend for rendering dynamic content...but you should really read the three ZPT chapters of "The Zope Book" before starting in order to understand what you can do with ZPT. -aj
pgpFSO7RGmfAL.pgp
Description: PGP signature
_______________________________________________ Zope maillist - [email protected] 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 )
