[ZPT] Forms and Zcatalog
Tim Fouracre
jhgfjhgfjhgf@hotmail.com
Tue, 03 Jul 2001 09:26:53 -0000
>Well, I don't want to discourage you, and it's could certainly be a
>learning exercise if you have time. One of the ZPT examples shows the
>basics of the ZTUtils Batch class, which you would need to use if you
>want to show your results the way the DTML does.
heh, i sat down on Monday and those examples really helped and i think i did
most of it :) However i do have a couple of questions concerning the
following bit of code:
<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 <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?
and although the first 3 lines of the code do get the relative data out of
the catalog and display it properly, it looks clunky to me. I mean the
second time i use "tal:repeat" i don't think i should be repeating, as i
should just be plucking out the one item i need, if that makes sense. But as
i said it works for me at the moment.
TIA
Tim
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.