plone 2.1 list all folders set to display as photo album

since plone 2.1 uses folders set to display as photoalbums instead of the CMFPhotoAlbum approach, I needed a way to list photo albums from a portal_catalog query (well, a smart folder actually, but the same thing really)

here’s a solution:-

1. in the zmi go into portal_catalog -> indexes
2. add a new FieldIndex called “layout”
3. reindex the catalog

now you can use layout in portal_catalog queries so a query containing type = Folder, layout=atct_album_view will return a list of folders set to display as photo albums

Leave a Reply