Last June I gave a talk at the 2020 Python Web Conference all about the cool things you can do with Plone. It served well as an introduction to the Plone Content Management System, but more than that it went over a number of little tips and tricks that would have made my life a lot easier had I known about them from day one. I decided to take those and make them into a blog post. If you would like to see the talk, you can find it on Six Feet Up's Youtube channel.
Here are 4 things I wish I knew when I first started developing in Plone:
As of Plone 5.2.2 any new Plone site comes with these default content types:
These are plenty to get you started, but notably, there isn't a blog post item by default. Creating one is super simple: go on admin>Site Setup
and look for "Dexterity Content Types” under Content:
From there you can create a new content type from scratch or clone and modify an existing content type. A copy of the News Item content type makes for a great Blog Post type with just a few modifications.
Content Rules have an incredible potential to make your life easier as a Plone developer. Content Rules will automatically perform actions on content when certain triggers take place. One simple example is moving images. By default, when you upload an image for a blog post it will go on whatever container or folder you're currently in. This isn't always desirable since you might not want your images to be in the same folder as your blog posts. You can create a rule that automatically moves the images you embed on a blog post to their own folder. Plone keeps track of this move, so your embedded images don't break.
To do this go on admin> Site Setup
and click on "Content Rules” on the Content Panel. Create a new rule with the triggering event Object added to this container
, add condition Content type: Image
, and action Move to folder: images
There's one more step: You have to apply the rule to a folder. Once the rule's been created you should see a Rules
item on the sidebar. Navigate to your blog posts folder and click on it, you'll be given the option to assign a rule to that folder. Pick your rule and click Add
.
Now images that you add to your blog posts will automatically go in the Images folder.
A Collection is one of the content types that come pre-installed in Plone 5.2.2. It is also a content type that many new users ignore, which is a shame because it is incredibly powerful. Collections are canned search queries. A collection allows you to lump a bunch of different content together based on any combination of criteria you define. You can create a collection for "all Blog Post items by a specific author," or "all Blog Posts items published in 2019,” etc.
TinyMCE is an open-source online rich-text editor used in a number of different systems and is the default editor in Plone. This is where you type up (or paste in) your blog posts, news items, etc. It comes with a handful of useful features like Headings, Font selection, etc. But did you know there are many features built in that you just need to enable?
If you go to admin> Site Setup
, look for TinyMCE under “General,” and then click on the "Plugins and Toolbar” tab. Here you have access to a number of features you just have to enable.
charmap
is useful if your writers are going to need to make use of obscure unicode characters. directionality
is useful if your writers might write in right to left languages like Hebrew or Arabic. You're also able to create custom plugins, but that's a bit outside the scope of this post.
So that's 4 things you can do with Plone out-of-the box that will give you a more richly featured Plone experience. In my talk, I also went into a couple add-ons – Mosaic and Diazo – that you can install separately to add even more functionality. I will be covering those in a future blog post all about Plone add-ons. Until next time, Plonistas!