<table tal:define="results here/my_zsql_method"> <thead> <tr> <th tal:repeat="name results/names" tal:content="name" /> </tr> </thead> <tbody> <tr tal:repeat="row results"> <td tal:repeat="name results/names" tal:content="python: row[name]" /> </tr> </tbody> </table>
Zope ZPT Display a query resultset dynamically
This basic markup will display any resultset with field names in the table head and corresponding data in the table body.
Snippet Viewed 1423 times.
Share your Zope ZPT code snippets:
- Get some recognition & a link back to your site.
- Create your own code library.
- Help your fellow developers, as they have helped you.