[Zope] zpt and hrefs
Pete Taylor
jtaylor at thig.com
Tue Mar 29 11:41:53 EST 2005
Hi all,
Sorry for the newbie question, but I've scoured TFM for 2.6 and 2.7 (as much
of the new book as is there), and I can't figure out how exactly to do the
following. basically i'm attempting to have an href link access a python
script with a particular set of parameters, have the python script call a
zsql method (the only way i've found to make zpt and zsql work together when
there are particular "WHERE" bits), and then return the relevant pieces back
out to another zpt using the "tal:replace="options/passed_params" construct.
i've tried using tal:attribute instead of href="" explicitly, but that
doesn't work any better. it may just be that i'm approaching this the wrong
way, in which case i'd be glad to try it another way...
normal href...
<code>
<a href="somescript?identifier=4">link me</a>
</code>
but assume identifier is built dynamically, and is held in a zope
repeat/replace loop like...
<code>
<table tal:repeat="item sequence">
<tr><td><a href="somescript?identifier=item/ret_val">link
me</a></td></tr>
</table>
</code>
obviously it doesn't work... it tries to pass the literal string
"item/ret_val" to identifier. but I would imagine there's got to be a way
to make that value dynamic. it works in dtml, but i'd really rather use zpt
and python scripts if at all possible. is there a better way to do this, or
am I just missing something obvious?
Thanks!
Pete Taylor
THIG Systems
(desk) 352.333.1722
(cell) 352.359.0073
CONFIDENTIAL NOTICE: This email including any attachments, contains
confidential information belonging to the sender. It may also be
privileged or otherwise protected by work product immunity or other
legal rules. This information is intended only for the use of the
individual or entity named above. If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution or the taking of any action in reliance on the contents
of this emailed information is strictly prohibited. If you have
received this email in error, please immediately notify us by
reply email of the error and then delete this email immediately.
More information about the Zope
mailing list