You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/classic-ui/layers.md
+44-3Lines changed: 44 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,13 +58,54 @@ Then views and viewlets from your product can be enabled on the site instance us
58
58
### Unconditional overrides
59
59
60
60
If you want to override a view or a viewlet unconditionally for all sites without the add-on product installer support, you need to use `overrides.zcml`.
61
+
You can override classes and templates in this file.
61
62
62
-
```{todo}
63
-
Explain how to use an `overrides.zcml`.
63
+
Overide a class:
64
64
65
-
See https://github.com/plone/documentation/issues/1426
If you want to override a viewlet or view of a specific add-on product, you need to use enheritance the Layer interface of the add-on product into your own Layer interface.
100
+
For example, if you want to override the `sidebar` viewlet of the `collective.sidebar` add-on product, you need to create a new Layer interface and inherit from the `collective.sidebar` Layer interface.
101
+
102
+
```python
103
+
from collective.sidebar.interfaces import ICollectiveSidebarLayer
104
+
105
+
classIYourAppLayer(ICollectiveSidebarLayer):
106
+
"""Marker interface that defines a browser layer."""
0 commit comments