Permalink
Browse files

fix contentpanels_body template and use them in the new getText metho…

…d of the ContentPannels CT, this makes CP compatible with collective.portlet.content and other tools which use getText, fixes: #5
  • Loading branch information...
MrTango committed Dec 4, 2011
1 parent 812c204 commit 3d7e3fdb417c0e2bcd836ca0efa2fa0cc4f347f5
@@ -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)
@@ -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;
View
@@ -31,6 +31,7 @@ eggs +=
Sphinx-PyPI-upload
repoze.sphinx.autointerface
iw.debug
+ collective.portlet.content
[releaser]
recipe = zc.recipe.egg

0 comments on commit 3d7e3fd

Please sign in to comment.