View all keys for plone catalog result -
how show keys items in catalog search?
links = self.catalog(portal_path='link') link in links: value in link: print value
with code can show values, don't know how show keys.
the zcatalog not homecoming dictionaries. returns sequence of result objects (called catalog brains, because can give them smarts. long historical story).
so loop on them, , each object has attributes each metadata column defined in catalog:
links = self.catalog(portal_path='link') link in links: print link.title
if need dynamically loop on available attributes, utilize .schema()
keys:
for link in links: key in link.schema(): print link[attr]
plone catalog
No comments:
Post a Comment