[Zope] How to get all URL's
lists at zopyx.com
Thu Nov 27 08:51:29 EST 2008
On 27.11.2008 14:45 Uhr, Rupesh P Raj wrote:
> How can I get the list of all urls from zodb. This is for creating an
> xml Sitemap? Zope version is 2.8.
You mean a list of all persistent objects?
root = context.getPhysicalRoot()
for path, obj in root.ZopeFind(root, search_sub=True):
print path, obj.absolute_url(1)
This is a *VERY EXPENSIVE* operation unless you use something like
Plone or CMF and ask the portal_catalog for all objects.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 316 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20081127/84c52a6c/attachment.vcf
More information about the Zope