[ZPT] Including data from ZSQL method in src: attribute

Mitch Pirtle mitchy at spacemonkeylabs.com
Thu Aug 28 12:44:30 EDT 2003


Hi list,

A little snag here, I'm looping through the results of a query that
includes first_name ('Mitch') and mugshot ('mitchy.jpg').

The concept I currently fail to grasp is how to insert the value of
mugshot in the src attribute.  The value of mugshot is just a pointer to
images ("media/mitchy.jpg" in the example).  I've coded it thusly:

<table>
  <tr repeat="row here/listEmployeeDetails">
    <td><img tal:attributes="src string:${portal_url}/media/?"></td>
    <td><span tal:content="row/first_name">First</span></td>
  </tr>
</table>

The "?" is where I want the values from mugshot.  How is this done?

-- Mitch




More information about the ZPT mailing list