[Zope] How to restrict search path in portal_catalog(path='')
Max M
maxm@mxm.dk
Fri, 04 Jul 2003 20:44:39 +0200
saravanan annamalai wrote:
> Hi,
> I have the following requirement.
>
> I just want to get the news items present in root folder only... /root
> not those in /root/Member's folders...
>
> using container.portal_catalog(meta_type='News Item',path=' ')
>
> I tried to use path argument as /root... But it doesnt work.... Can
> anz bodz help in this matter
You are using the wrong tool then. If you just want the content from one
folder, and not the subfolders, you should not use the catalog but get
them directly from the folder.
root_folder_content = container.root_folder.objectValues('News Item')
regards Max M