[Zope] Catalog question

Casey Duncan casey@zope.com
Mon, 2 Dec 2002 14:30:51 -0500


On Monday 02 December 2002 01:43 pm, Kevin Carlson wrote:
> Is it possible using an expression to disallow an object being added to=
 a
> catalog based on a certain string being contained in its path?  For exa=
mple,
> I want to include all objects in a subfolder except if the path include=
s the
> name 'sample' in the path.
>=20
> I think this may be possible utilizing the "expr" field on the Find Obj=
ects
> tab of a ZCatalog, but I'm not certain how to write the expression.  Ca=
n
> anyone offer some advice?

maybe this expr:

absolute_url().find('sample') =3D=3D -1

If it it would only be in the object id:

getid().find('sample') =3D=3D -1

of course YMMV.=20

hth,

-Casey