[Zope-CMF] Newbie question CMF Document
seb bacon
seb@jamkit.com
Thu, 9 Aug 2001 11:06:07 +0100
* Erik Enge <erik@thingamy.net> [010809 07:44]:
> [Jon Edwards]
>
> | But I can't find the correct syntax for searchresults... can anyone
> | else help?
>
> Normally, you'd have to do:
>
> for brain in aCatalog(<searchquery>):
> object = aCatalog.getobject(brain.data_record_id_)
>
> But perhaps the portal_catalog makes it easier.
This works for me:
<dtml-in "portal_catalog.searchResults(blah)">
<dtml-with "portal_catalog.getobject(data_record_id_)">
<dtml-var CookedBody>
</dtml-with>
</dtml-in>
I believe there's a more correct way of doing this these days, but I
can't remember what it is. And I'm too lazy to find out right now ;-)
seb