Collections and Contentlistings
A sprint at Jarn (Norway) to complete the remaining PLIP's related to collections, contentlistings and search.
At the European Plone Symposium in Sorrento (Italy) we organized a Birds of a Feather session about how to improve collections, contentlistings and search. Among the participants were Geir Baekholt, Carsten Senger and our complete team. Laurens organized the BOF session using his Plone UI research document as input.
The outcome of the BOF sessions lead to five PLIP's:
- PLIP 9295 Improved UI for collections
- PLIP 9283 A more lightweight backend for collections
- PLIP 9352 Combination of search results PLIPs (merge of 9271 and 9282)
- PLIP 9327 Unified interface for lists of content
- PLIP 9321 Reimplement the search form with an eye on usability
Carsten took up PLIP 9321 which left us four plips to complete.
Since the four PLIPs had a lot of overlap we decided to team up with Jarn and complete them all at once. On thursday morning we had a brainstorm session to determine what we already had and which direction to go. Geir already had a working package for plone.app.contentlisting for PLIP 9327 and we had done some work on the search results PLIP. After the brainstorm session we came up with a design using three packages:
- plone.app.contentlisting to create the unified interface of the content listings
- plone.app.search to contain all the search related functionality
- plone.app.collection to contain the Collection content type
Ralph, Roel and Geir worked on the backend. They used the :records mechanism of Zope to parse the query string. One query line consists of an index (query.i:records), an operator (query.o:records) and a value (query.v:records or query.v:records:list if it was a multiple input field). This query string was converted to a catalog query to get the actual search results.
Roel, Ralph and Geir working on the backend
Laurens, Denys and I worked on the user interface. We used the design from the PLIP and created a static HTML prototype to see if the design we came up with actually worked. Once we agreed this was the right way to go, we continued to build the query builder using the code from the backend team.
Laurens, Denys and me working on the UI
Once we got the query parser and the query builder done, it was time to glue everything together and store the query on the collection type. We worked throughout the weekend to get everything done just before the plip deadline. Ralph and Roel created the Collection type and Laurens and I finished the query builder and put the query builder into the criterion edit form of the new Collection type.
Finishing the collection type while enjoying the nice view.
After saving the query you can select view methods for the collection. These methods use the plone.app.contentlisting package build by Geir.
Summary view of the collection
Thanks go out to Jarn for providing the sprint location and we hope the framework team is as excited about the end-result as we are!