Best practise for extending an existing control panel form?

Hi all,
I'm trying to add some options to existing Plone control panels, such as options for the site title and social media settings. Taking the SocialControlPanel as an example, I initially tried to create an IExtendedSocialMediaSchema that implemented the ISocialMediaSchema, however this doesn't seem to work (I think because it calls getUtility(IRegistry).forInterface(self.schema, prefix=self.schema_prefix rather than using an adapter, but my Zope is a little rusty after working extensively with Volto). What would be the next best way of achieving this, overriding the entire control panel and manually setting the schema? Sorry to be vague, not quite sure how to get started on this one!

1 Like

Have you seen these?

And a bit older, but possibly still helpful:

Hey, thanks for these links! These worked great for creating a new control panel, but I'm not quite sure how to extend the concepts to editing an existing form.

I am not sure if extending the existing control panels is a good idea (if things change later (?) ).

Personally, I think my approach with

is quite OK. It requires 'very little code' to add another tab to the control panel'.

PS: Not sure if there are some small changes after Python3 that are not described in the docs, but this works: medialog.iconpicker/ at master · espenmn/medialog.iconpicker · GitHub

A quick glance over, this looks great! Would have been really nice to keep all the extra settings I'm adding seamlessly integrated into Plone, but this is definitely a next best thing! Any chance this will work with Volto/ the REST API?

I have not tested since I have not made anything with Volto (yet), but it works with 'standard' Plone 6.

The settings are kept in the registry, so you should be able to read / write them that way, if that matters.