[Zope-CMF] Sorting member roster by custom property

Kevin Carlson khcarlso@bellsouth.net
Mon, 6 May 2002 17:31:22 -0400


Hi,

I have added several custom properties to the portal_memberdata tool and can
successfully add new users to the roster.  I would like to be able to
display the roster sorted on a customer property but am having the following
problem.

If I use this code:

	<dtml-let roster="portal_membership.getRoster()">
	<dtml-in roster mapping>
	<dtml-let member="portal_membership.getMemberById(id)"
ln="member.getProperty('lastName')" fn="member.getProperty('firstName')"
r="member.getRoles()">

things work fine but aren't' sorted.  If I want to sort by lastName or
firstName I cannot specify the property in a "sort=" attribute for the
dtml-in tag because it doesn't exist in the returned mapping.

Is it possible to reference an attribute of the memberdata object like this
or do I need a custom sort routing to build a list of dictionaries?

Thanks,

Kevin