[ZPT] Forms and Zcatalog

Tim Fouracre jhgfjhgfjhgf@hotmail.com
Mon, 16 Jul 2001 09:50:54 -0000


Thanks for the help, I've been away for a week, but just before i went i 
incorporated the ZTUtils batch facility into my code (the dtml conversion 
example was a great help), and in doing so realised that:
Evan Simpson wrote:
>The tal:define and second tal:repeat aren't doing anything

The code i have now is:

<div tal:define="b_start python:path('request/b_start') or 0;
                 results python:container.zope.ZopeCatalog(popular=0);
                 Batch python:modules['ZTUtils'].Batch;
                 global batch python:Batch(results, 2, 
int(b_start),orphan=1)"
        tal:replace="nothing"></div>

  <tr tal:repeat="item batch">
    <td>
     <a tal:attributes="href string:${here/message}?body=${item/body}"  
href="whats this?">
     <b tal:content="item/subject">Subject</b>
     </a>
    </td>

The problem now is the :
<tr tal:repeat="item batch"> makes the batching work fine, however the 
searching doesn't work (instead all records are displayed) and if i replace 
that line with
<tr tal:repeat="item container/zope/ZopeCatalog"> the batching obviously 
doesn't work but the correct records are displayed. So how do i combine the 
two?

>It looks fine to me.  What actually gets inserted as the href value,
>when you view the raw HTML of the generated page?
Just had a look and actually nothing does, i thought "whats this?" was 
supposed to. Is this something to do with why it doesn't work as it still 
doesn't work :/

Thanks a lot for your help

Tim
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.