[Zope-CMF] Pulldown list of members
Kelley, Sean
SKelley@ci.santa-rosa.ca.us
Thu, 6 Jun 2002 08:26:43 -0700
Hi,
Thanks for this- it is not quite what I was looking for. I want to get a
pulldown list of the actual names of the creators rather than the option to
choose between creator and any.
Sean
> -----Original Message-----
> From: Tres Seaver [mailto:tseaver@zope.com]
> Sent: Wednesday, June 05, 2002 8:36 PM
> To: Kelley, Sean
> Cc: 'zope-cmf@zope.org'
> Subject: Re: [Zope-CMF] Pulldown list of members
>
>
> On Wed, 2002-06-05 at 19:48, Kelley, Sean wrote:
> > Hi,
> > I want to create a pulldown list of members or creators on
> the CMF advanced
> > search page so that instead of having to type the user name
> fully and
> > correctly when searching by creator, there would be a handy
> list to select
> > from. Does anyone have any idea how to do this or has
> someone done it?
> > Seems like it would be a good standard component of CMF
> skins and should
> > only list creators as opposed to all members. I am new to
> zope and CMF so I
> > am nearly useless at this type of thing.
>
> ZCatalogs have a method, 'uniqueValuesFor', which returns the set of
> possible values in an index. You might use it so (untested)::
>
> <select name="creator">
> <option value="" selected>Any</option>
> <option tal:repeat="uc
> python:here.portal_catalog.uniqueValuesFor('Creator' )"
> tal:attributes="value uc"
> tal:content="uc">CREATOR</option>
> </select>
>
> Tres.
> --
> ===============================================================
> Tres Seaver tseaver@zope.com
> Zope Corporation "Zope Dealers" http://www.zope.com
>