Setting up an article content type in Plone

| |

I had a look in the layout and presentation products of plone. BernArticle sounded interesting as it looks like it gives you a lot of flexibility for laying out your article. I installed it in the Products for my plone instance and then added the product to my tws site. All you have to do is unpack it to the Products directory and restart Zope and then go to "Site Setup" in your Plone site click on "Add/Remove Products" and then select "BernArticle .." from the "Products available for install" and click on Install.

Now when you go to "Add Item" in a folder in Plone you will see "Article" and "Collector of Blocks" among the Objects available for you to add. I haven't looked at the collector of Blocks option yet but apparently you can what I read on the project page makes them sound very interesting, here is a quote:

"BernArticle brings new content types and utilities to the Plone CMS. Web pages (i.e. articles) are composed of article blocks which can contain text, images, files, and so on. Each block can have its own layout which can be chosen from a set of registered layout views. The list of registered views can be customized and extended." see http://plone.org/products/bernarticle

The install of BernArticle clobbered my banner as it installed its own global_logo.pt into /Products/BernArticle/skins/BernArticle_public which overroad the one I had in my custom theme. I just removed the Bern one to revert my banner back but it might be that you would rather customise the Bern one. It also installed a number of portlets in the right hand colum which are displayed to logged in users but so I shifted them to the left hand column so not to interfere with my current layout. Still have to play around with the styling of these portlets.

I took an example article for our old website: http://wilderness.org.au/regions/qld/big-win-conservation-rangers/ and created an article in the home folder. I was quite impressed you add your description and content as you would in a normal file and then choose a layout, there are about 8 different ones to choose from and they offer you a choice of how many images you want associated with the article and how they are laid out in the article. You then add however many images you want to the article, I only added 1 as I chose a layout using one to copy our old article layout but you might chose to add more.

Apparently new custom content block types can be defined as new Archetypes so I imagine it would be possible to add Flash or audio as possible block types and create layouts that utilise them.

One thing to be aware of is that BernArticle doesn't appear to not enable you to control the width of the article via styles but rather it is set in the properties of the article and extracted by the skins/BernArticle_scripts/bernarticle_get_width.py script. I wanted to change that so it better suited the width of my main column at the current resolution. To do that you have to go to the ZMI and click on:

plone site -> portal_properties -> BernArticle Properties

I then set the "BernArticle_width" to 700px.

Ok not quite looking like the display of the old article, need to sort out how to get more links and description showing but it is a good start.

I set this article as the default display for the home folder. You do this by clicking on the "display" and choosing "Change content item as default view" and then selecting what I item in the folder you want to use as the default view.

Ok next steps are probably to look at setting up the site architecture and then maybe staging and live and work flow but that is enough for now.