[Zope] Critical Question for Dieter - Testing with <dtml-in Catalog>

Bakhtiar A Hamid kedai@kedai.com.my
Wed, 15 May 2002 15:59:59 +0800


> I need to be able to test the Catalog to see if the username is already
> indexed, and if so, raise a message that that username is already on fi=
le.
>
> I've tried :
> <dtml-in Catalog>
> <dtml-if "_['username'] =3D=3D _['sequence-item']">

a lot of stuff snipped

what's the username index in the Catalog?

let's say the index is u_name

<dtml-if "Catalog(u_name=3D{'query':_['username']})">
user exist
<dtml-else>
do your thang here
</dtml-if>

this code is untested, and i claim no responsibility for any data munged,=
 zope=20
instance sank, etc, etc

hth

--=20

=09http://www.kedai.com.my/             http://www.kedai.com.my/eZine
=09http://www.zope.org/Members/kedai    http://www.my-zope.org
=09Am I Evil?