plone / bobtemplates.plone

Python Code Templates for Plone Projects with mr.bob
https://pypi.org/project/bobtemplates.plone/
GNU General Public License v2.0
24 stars 31 forks source link

add configlet REST API panel adapter to the controlpanel subtemplate #481

Closed erral closed 3 years ago

erral commented 3 years ago

With this adapter the controlpanel is available directly on the REST API and will be available also through Volto.

MrTango commented 3 years ago

@erral thx for the contribution, since I'm not up to date with this topic, woulc you join us in the classic-ui Discord channel and shortly explain to me what this does? I'll probably make another release this evening.

erral commented 3 years ago

The point is that classic controlpanels built for Plone are not rendered by default in Volto, unless they provide some adapter registration like the one in this PR. The adapter registration for controlpanels rendered by default in Volto is done in plone.restapi.controlpanels, zcml registration here.

So the whole story here is to register also the endpoint for the controlpanel created by this subtemplate, this way all controlpanels created with the subtemplate will be directly available in the REST API and also in Volto.

MrTango commented 3 years ago

So the control panel is something addon related right? So the usecase is, to create the backend part for the controlpanel, which then probably has some frtonend stuff in volto, right?

erral commented 3 years ago

Yest, that's right!