[ZPT] Forms and Zcatalog

Evan Simpson evan@digicool.com
Mon, 09 Jul 2001 15:27:00 -0400


Tim Fouracre wrote:

>   <tr tal:repeat="item container/zope/ZopeCatalog">
>    <td tal:define="sequence python:container.zope.ZopeCatalog">
>     <b tal:repeat="item sequence"></b>
>     <a tal:attributes="href string:${here/message}?body=${item/body}"
>         href="whats this?">
>         <b tal:content="item/subject">Subject</b></a>
>    </td>
>   </tr>


The tal:define and second tal:repeat aren't doing anything, so this can 
be written as:

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

> The <a> tag is supposed to be a link to the "message" PT, passing the 
> "body" variable also. However i cannot get it to work, i have tried all 
> variantions with Doc and Template, but at least when i use "string" i 
> see the "message" code in the status bar as a string when i hover over 
> the link. What should it be?


It looks fine to me.  What actually gets inserted as the href value, 
when you view the raw HTML of the generated page?


Cheers,

Evan @ digicool