Lineage and registry based control panel

I have a working registry based control panel and I want to make it useful with lineage

  • Is it doable (or even better: in the same 'package'/ add-on

I have used this behavior to be able to override global registry values in a lineage-like site

Thanks.

Just to be sure: With this approach, I should probably make a content type that I can use as 'child folder'?

I also found this: https://pypi.python.org/pypi/lineage.registry
.. which seems quite similar (?=

This is possibly a simpler option:

When using https://github.com/collective/lineage.registry you get a local registry for each lineage subsite automatically.

With that, your controlpanel should store it's values in the local registry unless you explicitly aquire the registry from the plone site root.

If you need to local registry for a subsite, which was already created: disable the subsite feature once and enable it then again. There is a event subscriber which listens to subsite creation which installs the local registry.

Related to controlpanels in a Lineage subsite:

2 Likes

Looking at that code, it looks like all that is needed is to register a browser view for the control panel ( for ChildSite). Is that correct (security is not an issue here, as there are only members and admins....

Yes, you just need to make sure the controlpanel browser view is not only callable on IPloneSiteRoot (like it's configured here: https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/controlpanel/browser/configure.zcml#L263 ) but also on IChildSite (like here: https://github.com/collective/lineage.controlpanels/blob/master/src/lineage/controlpanels/configure.zcml#L119 ).

The rest of the tricks are done by lineage.registry.

1 Like