However, this returns the contentValues of the entire plone site, while obj/Title returns te title of the search result. Should I use something different from obj or define obj?
Any insights on this problem are greatly appreciated!
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
Plone-Users mailing list
> I use Plone 2
> And want to make a portal catalog search for a folderish archetype where
> the search includes a check wether the folderish archetype object
> contains any objects.
> I tried te following:
> <div tal:define="results
> <span tal:content="obj/Title">
> With the check for object contents is:
> <span tal:content="python:obj.contentValues()">Antwoord</span>
> However, this returns the contentValues of the entire plone site, while
> obj/Title returns te title of the search result. Should I use something
> different from obj or define obj?
> Any insights on this problem are greatly appreciated!
You don't show where 'obj' comes from, but I'll assume it's the repeat
variable over 'results'.
Catalog results are not objects themselves (since that would be very
expensive, and catalogs are about efficiency) but "Brains". You may ask
them for an attribute of any metadata stored in the catalog, but they
have no methods or any attributes not stored in metadata. So when you
ask for 'contentValues' you acquire it (possibly from the portal_catalog
If you want the object itself, you must follow the brains API, and ask
it for 'getObject'.