Skip to content

Commit

Permalink
Merge pull request #368 from plone/fix-adapter-registration
Browse files Browse the repository at this point in the history
Fix adapter registration
  • Loading branch information
mauritsvanrees authored Jun 16, 2024
2 parents f799405 + 6e9258a commit 52e228e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions news/+fix-adapter.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix `DefaultBodyClasses` adapter registration.
[gforcada]
5 changes: 5 additions & 0 deletions plone/app/layout/globals/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,9 @@
<implements interface="zope.annotation.interfaces.IAttributeAnnotatable" />
</class>

<adapter
factory=".layout.DefaultBodyClasses"
name="default-classes"
/>

</configure>
2 changes: 1 addition & 1 deletion plone/app/layout/globals/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def bodyClass(self, template, view):
return " ".join(sorted(body_classes))


@adapter(Interface)
@adapter(Interface, Interface)
@implementer(IBodyClassAdapter)
class DefaultBodyClasses:
def __init__(self, context, request):
Expand Down

0 comments on commit 52e228e

Please sign in to comment.