[Zope] Q: <dtml-in sort=twofields>

Mario Lang mlang@home.delysid.org
Wed, 22 Mar 2000 14:42:42 +0100


Hi.

I am constructing a search interface for a catalog.
The objects I index have three relevant properties:
title (textual title)
id (the id, sortable)
book_title (the name of the book where the chapter is included)

I want to have atabular result like this:

Book 1     Chapter 1.1
           Chapter 2.1
Book 2     Chapter 1.1
           Chapter 4.2


To acomplish this I currently do something like:

<dtml-in Catalog sort=id>
  <tr>
   <td><dtml-if first-book_title><dtml-var book_title></dtml-if></td>
   <td><dtml-var title></td>
  </tr>
</dtml-in>

But, to have the list look nice, I'd need to specify
two fields for sorting, book_title should be the primary
field sorted by, and id should be the field all identical
book_title entries should be sorted on.

Is there a way to do this with dtml-in?

CYa,
    Mario <mlang@delysid.org>