In my AJAX navigation add-on (PyPI package and Github present but currently not up-to-date) I have "@@ajax-nav" browser views which are intended to be different for
- folders
- all other content types.
(currently almost only Archetypes-based data).
However, with this ZCML:
<browser:page
name="ajax-nav"
for="Products.ATContentTypes.interfaces.IATContentType"
class=".AjaxnavBaseBrowserView"
permission="zope2.View"
/>
<browser:page
name="ajax-nav"
for="Products.ATContentTypes.interfaces.IATFolder"
class=".folder.AjaxnavBrowserView"
permission="zope2.View"
/>
... I get a zope.configuration.xmlconfig.ZopeXMLConfigurationError
:
ZopeXMLConfigurationError: File "/opt/zope/common/eggs/Products.CMFPlone-4.3.3-py2.7.egg/Products/CMFPlone/configure.zcml", line 98.4-102.10
ZopeXMLConfigurationError: File "/opt/zope/instances/unitracc-devel/src/visaplan.plone.ajaxnavigation/src/visaplan/plone/ajaxnavigation/configure.zcml", line 30.2-30.30
ZopeXMLConfigurationError: File "/opt/zope/instances/unitracc-devel/src/visaplan.plone.ajaxnavigation/src/visaplan/plone/ajaxnavigation/views/configure.zcml", line 17.2-22.7
TypeError: multiple bases have instance lay-out conflict
Now what should I do, i.e.: What would be "best practice"?
- Detect folders at runtime?
- Is there a common non-folder interface to use?
- Use a special
layer
for folder objects? - Any other options?