Personal tools
You are here: Home Documentation How-tos View an object's catalog information
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

View an object's catalog information

This How-to applies to: Plone 2.5.x, Plone 2.1.x, Plone 2.0.x
This How-to is intended for: Server Administrators, Integrators, Customizers, Developers

This little utility is really useful to me. I'm not sure it's posted elsewhere, it comes from Joel Burton originally. Inspect any content on your site (including folders) by appending /getCatInfo to the URL.

In your Plone root, from the ZMI, add a Script (Python). Give it the id getCatInfo, and use the code below:

from string import join
obid = context.id
path = join(context.getPhysicalPath(), '/') 
results = container.portal_catalog(path=path,getID=obid,sort_on='created',sort_order='reverse')
rid = ''
for r in results:
     rid = r.getRID()
if rid:
     print container.portal_catalog.manage_objectInformation(rid=rid)
else:
     print "Not in the catalog, apparently."
return printed

After you save this, you can append /getCatInfo to any Plone URL to get complete catalog information about the page, folder, link, etc. you are looking at.

 

by Dan Thomas last modified June 8, 2007 - 21:51
Contributors: Joel Burton
All content is copyright Plone Foundation and the individual contributors.

origins of this script

Posted by Lupa Zurven at October 11, 2007 - 22:12
I don't know about Joel's contribution to this script, nor do I remember (unfortunately) where I got my own inspiration for this script, but it is mine in this form, as can be seen in my post at ZopeLabs here: http://www.zopelabs.com/cookbook/1111384141

(easy to find with a search in google for the "Not in the catalog, apparently." quote, not so easy to find any other way. thanks for posting it here on plone.org... +lupa+ :-)

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by