[Zope] iteration through list with dtml-tags
jdhunter at ace.bsd.uchicago.edu
Tue Aug 6 20:12:33 CEST 2002
>>>>> "Axel" == Axel Bock <news-and-lists at the-me.de> writes:
Axel> Hi, I have a little problem: an SQL query delivers me a list
Axel> of [(name, firstname, id, email), ...] and I want to put
Axel> this in a table, but OUT OF ORDER.
Axel> So my question is how do I crate a table like this: |
Axel> firstname lastname | email | id | which is not possible with
Axel> "normal" <dtml-in>-iteration.
Unless I'm misunderstanding your problem, this should not present any
difficulties. For example, if your zope Z SQL Method is named
'select_sql', you can create the table like so:
<dtml-in select_sql sort="last">
<th><dtml-var first> <dtml-var last></th>
The sort argument lets you sort on any table column, and within the
dtml-in tags, you can reference the fields n any order you wish.
Axel> I strongly hope someone can help me!
And I strongly hope this helped!
More information about the Python-list