[Zope-CMF] DEV: _morphSpec
alan runyan
alan runyan" <runyaga@runyaga.com
Fri, 1 Nov 2002 11:06:44 -0600
thanks tres. I was being overly whiney and
not using the source enough.
/me goes back to jedi training
~runyaga
----- Original Message -----
From: "Tres Seaver" <tseaver@zope.com>
To: "alan runyan" <runyaga@runyaga.com>
Cc: <zope-cmf@lists.zope.org>
Sent: Friday, November 01, 2002 11:53 AM
Subject: Re: [Zope-CMF] DEV: _morphSpec
> On Thu, 2002-10-31 at 22:22, alan runyan wrote:
> > erm. it seems the default for contentValues() spec argument
> > is suppose to be meta_type's not portal_types. this could
> > easily be changed in _morphSpec(). when it called
> > portal_types its saying filter using meta_type's only.
> >
> > Is this really desired default behavior? This means all
> > "repurposed" content could only be queried by passing
> > the meta_type and then doing extra filtering.
> >
> > I would propose that we call listContentTypes() with
> > no arguments.
>
> The 'spec' argument is primarily there for backward compatibility. The
> '_filteredItems' method is the primary means of getting better results
> from 'contentValues', 'contentIds', and 'contentItems'. E.g.:
>
> <div tal:define="filtered python: here.contentValues(
> filter={'Subject':'foo'} )">
> <p tal:repeat="val filtered"
> tal:content="val/Title">TITLE HERE</p>
> </div>
>
> Please look at the ContentFilter class at the bottom of
> CMFCore/PortalFolder.py; it permits filtering on a variety of
> values, including 'portal_type'.
>
> Tres.
> --
> ===============================================================
> Tres Seaver tseaver@zope.com
> Zope Corporation "Zope Dealers" http://www.zope.com
>