Skip to content

Commit

Permalink
fix contentpanels_body template and use them in the new getText metho…
Browse files Browse the repository at this point in the history
…d of the ContentPannels CT, this makes CP compatible with collective.portlet.content and other tools which use getText, fixes: #5
  • Loading branch information
Maik Derstappen committed Dec 4, 2011
1 parent 812c204 commit 3d7e3fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Products/CMFContentPanels/ContentPanels.py
Expand Up @@ -444,4 +444,10 @@ def movePanel(self, pageIndex, columnIndex, panelIndex, toColumn, toPanel):
self.panelsConfig[pageIndex]['pageColumns'][toColumn]['columnPanels'].insert(toPanel, panel)
self._p_changed = 1

def getText(self):
""" return the whole ContentPanels content, one panel after
another, to add support for collective.portlet.content.
"""
return self.restrictedTraverse('contentpanels_body').render()

registerType(ContentPanels, PROJECTNAME)
Expand Up @@ -23,7 +23,7 @@
global member mtool/getAuthenticatedMember;
global isAnon mtool/isAnonymousUser;
global checkPermission nocall:mtool/checkPermission;
global Iterator python:modules['Products.CMFPlone'].IndexIterator;
global Iterator python:modules['Products.CMFPlone'].utils.RealIndexIterator;
global tabindex python:Iterator(pos=80000);
global normalizeString nocall:putils/normalizeString;
global contentpanels_in python:here.aq_inner;
Expand Down
1 change: 1 addition & 0 deletions buildout.cfg
Expand Up @@ -31,6 +31,7 @@ eggs +=
Sphinx-PyPI-upload
repoze.sphinx.autointerface
iw.debug
collective.portlet.content

[releaser]
recipe = zc.recipe.egg
Expand Down

0 comments on commit 3d7e3fd

Please sign in to comment.