[Zope-CMF] Workflow and zcatalog and zclasses
Dieter Maurer
dieter@handshake.de
Sun, 14 Jul 2002 23:56:53 +0200
S Haldar writes:
> ...
> Now the second part of the problem -- I want to sort
> the portal search results by a property value,
> district wise. What's the best approach?I tried the
> following two - and came up with some problems:
You do not tell us which problems you came up with...
> 1. Sorting the results when I make the
> portal_catalog() call. Is there any way to sort the
> objects by zclass properties when I do a
> portal_catalog call?
Yes, if your property is indexed. Then, you can use the "sort_on"
argument to the search.
> 2. Creating new metadata that can be used for sorting.
> Is there any way to define your own metadata when you
> programatically create zclass objects.
You define the metadata table only once, not each time
a ZInstance is created.
To get you ZInstance automatically cataloged, you derive
from ZCatalogPathAware.
Dieter