Overriding contact-info with a skins-based object in Plone 5

Hi everybody,

I was wondering if it was still possible, in Plone 5.2, to override the standard contact form with a skins-based component? I know portal_skins is deprecated, and will likely be removed in Plone 6, but I have my reasons for wanting to stick with it a little longer...

Thanks in advance,

Laurent.

Having a skin object and a view with the same name can lead to surprises: at the portal object, the skin object will win, elsewhere the view. Thus, I recommend to avoid name conflicts of this kind.

There is good support for view customizations. I recommend to go this route. You can, if you want, implement a view which looks for a skin object and then behave like it.

Thank you very much Dieter, as always :slight_smile:

The reason why I'm trying to stick with portal_skins, is that I am using a (very old) captcha library, quintagroup.captcha.core, which is skins-based, and I'm not sure how to include the captcha in the autogenerated Plone 5 form. My client doesn't wish to go to ReCaptcha, which is too heavy for the end-user.

Almost surely, the form is implemented via a view. Provided that you use your own theme, it is easy to override any view in a theme specific way. As already written, you can implement a view which delegates to a skin object.

Plone forms now are typically based on z3c.form. This form framework is designed for easy customization: it is easy to add fields and provide widgets and validators for new kinds of field types. It might not be too hard to integrate a captcha into existing forms.

Plone Foundation Code of Conduct