Plone Training Day 1 - Hacking Plone

Hacking Plone by Jean Jordaan, Mike Metcalfe, and Kim Nguyen is a one-day session for Web developers, power users and content management leads. Create custom content types, a design for a website, layouts for homepages and content types, custom application logic, and forms-with-workflow application logic. All in the browser!

The first part of the training session was geared toward creating a conference demo site using the following techniques:

Building a hierarchy of Dexterity Content-Type

The hierarchy for the conference data we built is shown in the diagram below:

Re-usable content and structure

One of Plone most useful features is being able to run multiple websites on a single instance/install of Plone. The Plone Conference websites, for example, 2018.ploneconf.org, 2017.plonecof.org and 2016.ploneconf.org is or can be served from the same Plone instance. Multi-tenant or Multi-site Management is an out-of-box feature of Plone. Plone offers a seamless movement of data between Plone website on the same Plone instance. However, if the data needs to be moved to a different Plone instance, there are many obvious ways to do. The one we used in the training was Collective ImportExport.

Collective ImportExport addon was used to generate a downloadable zip file for a Plone content and its children directly through the web (TTW). The data exported as a CSV file.

We exported the conference data from the Plone Conference 2018 website.

Afterwards, we imported it, which includes speakers, locations and sessions. However, a parse script was used to make the generated CSV file more usable by the Demo site.

Allowing Speakers to have an account and unique profile page per Conference.

We then installed Dexterity Membrane addon and added the Membrane Group behaviour to the Speakers Content-Type and the Membrane User behaviour to the Speaker Content-Type.

This behaviour will create users and groups within Plone. Therefore, when a site manager creates a Speaker content object, an associated inactive user account will be created inside the Speakers group for the Conference and a reset password email will be sent to the speaker. Once the speaker reset the password, it will activate the user account and publicly published the speaker profile page. The benefit is being able to create users, groups and their content/profile page from at same time (single entry).

Creating custom views, validators and vocabularies through-the-web

Ambidexterity was then used to create custom pages/views directly through the web.

Ambidexterity allows a site administrator to do TTW edits of views, defaults, validators and vocabularies for Dexterity content types.

Lunch Time Photos

Managing Workflows and content state

The first part of after lunch session was about using Ambidexterity with Workflow Manager.

Workflow Manager is a very easy TTW tool that could replace the ZCMI Workflow Editor to manage, track and control the state of a piece of Plone content. By using Ambidexterity and Workflow Manager, we were able to assign specific speakers to have a particular workflow.

The benefits of Workflow Manager

It allows a site administrator to TTW export and import of views, defaults, validators and vocabularies for Dexterity content types.

Assumingly, one can use the exported views, defaults, validators and vocabularies to prototype the look and behaviour of the content type, which can be passed to a developer

The second part of after lunch session was geared towards using ZCMI Workflow Editor to do advance TTW customization. The ZCMI Workflow Editor is a Zope Interface, which Plone is using. Note, Plone is built on top of Zope and ZODB.

Theming using Mosaic Layout and Multi-theme

Mosaic Layout and Tiles

Configuring the theme using Multi-Theme

Changing the theme colours

Using the theme fragments

Customizing the tiles

Other Important Notes

PloneFormGen has more functionality than EasyForm when it comes onto overriding templates, inserting JS code for additional functionality and using data stored as content for Plone. It is more compatible with Plone 5 than a couple of months ago when I tried to use it. It’s the most widely used GUI tool for creating forms.

Collective.EasyForm, which is another GUI tool for creating forms. It was said to be the replacement for PloneFormGen after Plone 5.2. However, PloneFormGen still stands strong and with a large community that is pushing it to be more compatible with Plone 5.

Uwosh.pfg.d2c, which provides a dynamic content type to store PloneFormGen form data into

FormFlow is a relative new GUI form creation tool. It is similar to PloneFormGen, however, it uses Dexterity forms and container to store and manage form fields.

Jean Jordaan spoke about the creation of Plomino, a form generator for Plone, which was used in Plone 4.

Kim Nguyen gave a brief intro on Castle CMS and the background story of how it came about. He will speak more about Castle CMS in his presentation on Tuesday training session.