Plone Content Types
A very short post about Plone Content Types with zero code.
I thought I'd write this into a thought, as I personally want it to be referenced somewhere, as it did take me a bit to properly understand how this all works.
Firstly, in Plone, it is possible to create custom content types using it's native control panel and a form-based system. I wrote a News post I linked here which goes over the process of creating the content type through the web, and creating a basic page template as a custom view for the content type. What I did not know at the time was how to set a custom icon for the content type so it would appear to public facing users, so if anyone visited this site before today, they might have noticed that the Virtual Pet icon was just a box of sorts, and not properly customized. Now, it displays a game controller, as most, if not all my embedded pages on this website will link to a game I've created, so I thought this would be the most appropriate icon.
So how is that icon customized? Well, it's not entirely straight-forward, even the Plone community post I found was a bit difficult to fully understand. Being very new to Plone probably didn't help me follow along either, remember I mostly used standard Zope back in the day, and not Plone...
So, how is this custom content type icon customized? Well, it is done through what is called the Configuration Registry. This page at first can look a bit confusing, much like the Windows Registry... But here is how it's done, visit this page through the Site Setup, and go into Advanced, and in there you will see the Configuration Registry.
Create a new record by going to the tab. Here is an example for what you could use for each field value here.
Field Name: plone.icon.contenttype/embeded_page
Field Title: Embeded Page
Field Type: TextLine
I'm honestly not sure what the Required checkbox does, it can be left unchecked. Upon pressing Add Field, you will be prompted for a value. This is the icon you wish this content type to have, in this example we'll be using the controller from bootstrap, so in value place this: ++plone++bootstrap-icons/controller.svg
That's it! You can see all the available icons in the Plone git repository.
