Is there a way to register Dexterity Contents with another catalog than
In Archetypes based contents there was the
archetype_tool, where it was possible to map portal types to catalogs. The logic behind was handled by
At the moment I have this requirement to register Dexterity contents with a specific catalog and I'm thinking about creating a mix-in class for these contents similar to
CatalogMultiplex, because it does not look like that it can be achieved with a behaviour.
I also tried to override this code in my content class, coming from
# The following method can be overridden using inheritance so that it's # possible to specify another catalog tool for a given content type def _getCatalogTool(self): return getToolByName(self, 'my_catalog', None)
Unfortunately, this raises this error:
Traceback (innermost last): Module ZPublisher.Publish, line 138, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 48, in call_object Module plone.z3cform.layout, line 66, in __call__ Module plone.z3cform.layout, line 50, in update Module plone.dexterity.browser.add, line 118, in update Module plone.z3cform.fieldsets.extensible, line 59, in update Module plone.z3cform.patch, line 30, in GroupForm_update Module z3c.form.group, line 145, in update Module plone.app.z3cform.csrf, line 21, in execute Module z3c.form.action, line 98, in execute Module z3c.form.button, line 315, in __call__ Module z3c.form.button, line 170, in __call__ Module plone.dexterity.browser.add, line 101, in handleAdd Module z3c.form.form, line 265, in createAndAdd Module plone.dexterity.browser.add, line 80, in add AttributeError: 'NoneType' object has no attribute 'id'
Did anyone ever had a similar requirement or has an idea how to approach it?
Any input from you is highly appreciated.