Skip to content

Commit

Permalink
register adapter only for plone.app.layout>=2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agitator committed May 16, 2018
1 parent 956868d commit 4f2811f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,8 @@ Changelog
2.1.1 (unreleased)
------------------

- Fluid row styles only make sense on pages without portlets and are now only active if no portlet columns are shown.
- Fluid row styles only make sense on pages without portlets.
In Plone 5.1.3 we can check that automatically (with plone.app.layout 2.8.0) and those styles are only active if no portlet columns are shown.
[agitator]


Expand Down
1 change: 1 addition & 0 deletions README.rst
Expand Up @@ -78,6 +78,7 @@ Subcolumns

Fluid rows
For fluid (full width) rows select any tile in the row and choose "Fluid" from the "Format" menu.
Fluid row styles only make sense on pages without portlets. In Plone 5.1.3 we can check that automatically (with plone.app.layout 2.8.0) and those styles are only active if no portlet columns are shown.


Installation
Expand Down
8 changes: 7 additions & 1 deletion src/plone/app/mosaic/layoutpolicy.py
@@ -1,10 +1,16 @@
# -*- coding: utf-8 -*-
from plone.app.layout.globals.interfaces import IBodyClassAdapter
from plone.portlets.interfaces import IPortletManager
from plone.portlets.interfaces import IPortletRetriever
from zope.component import getMultiAdapter
from zope.component import getUtility
from zope.interface import implementer
from zope.interface import Interface

try:
from plone.app.layout.globals.interfaces import IBodyClassAdapter
except Exception as e:
class IBodyClassAdapter(Interface):
""" Pseudo adapter class if plone.app.layout is < 2.8.0 """


@implementer(IBodyClassAdapter)
Expand Down

0 comments on commit 4f2811f

Please sign in to comment.