Skip to content

Instantly share code, notes, and snippets.

@toutpt
Created September 26, 2013 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toutpt/6719746 to your computer and use it in GitHub Desktop.
Save toutpt/6719746 to your computer and use it in GitHub Desktop.
This script can be used as Python Script in ZMI
catalog = container.portal_catalog
types = container.portal_types.objectIds()
views = {}
for t in types:
brains = catalog(portal_type=t)
for brain in brains:
ob = brain.getObject()
layout = ob.getLayout()
if t not in views:views[t] = []
if layout not in views[t]:
views[t].append(layout)
print views
return printed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment