[Plone 4.3.15]
Hello, I'm trying to customize the front page of my plone site and we have "def populate_cover(site)" to populate the cover (mainly carousel).
def populate_cover(site): """Populate site front page. The layout is composed by 4 rows: Populate and configure those tiles. """ from cover import set_tile_configuration from plone.uuid.interfaces import IUUID frontpage = site['front-page'] # first row tiles = frontpage.list_tiles('collective.cover.carousel') obj1 = site['institucional']['noticias']['terceira-noticia'] obj2 = site['institucional']['noticias']['primeira-noticia'] uuid1 = IUUID(obj1) uuid2 = IUUID(obj2) data = dict(uuids=[uuid1, uuid2]) frontpage.set_tile_data(tiles[0], **data) set_tile_configuration(frontpage, tiles[0], image={'scale': 'large'})
But always return AttributeError: 'list' object has no attribute 'items'
Traceback (most recent call last): File "/home/pc-lee/Plone/buildout-cache/eggs/plone.subrequest-1.8.4-py2.7.egg/plone/subrequest/__init__.py", line 155, in subrequest bind=1 File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/ZPublisher/mapply.py", line 78, in mapply else: return object(*args) File "/home/pc-lee/Plone/buildout-cache/eggs/plone.tiles-2.0.0b3-py2.7.egg/plone/tiles/esi.py", line 84, in __call__ return self.index(*args, **kwargs) File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 125, in __call__ return self.im_func(im_self, *args, **kw) File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 59, in __call__ sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0), File "/home/pc-lee/Plone/buildout-cache/eggs/zope.pagetemplate-4.3.0-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 134, in pt_render strictinsert=0, sourceAnnotations=sourceAnnotations File "/home/pc-lee/Plone/buildout-cache/eggs/zope.pagetemplate-4.3.0-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 260, in __call__ interpreter() File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tal-4.3.0-py2.7.egg/zope/tal/talinterpreter.py", line 272, in __call__ self.interpret(self.program) File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tal-4.3.0-py2.7.egg/zope/tal/talinterpreter.py", line 344, in interpret handlers[opcode](self, args) File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tal-4.3.0-py2.7.egg/zope/tal/talinterpreter.py", line 587, in do_setLocal_tal self.engine.setLocal(name, self.engine.evaluateValue(expr)) File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/tales.py", line 696, in evaluate return expression(self) File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 217, in __call__ return self._eval(econtext) File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/Products/PageTemplates/Expressions.py", line 155, in _eval return render(ob, econtext.vars) File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/Products/PageTemplates/Expressions.py", line 117, in render ob = ob() File "/home/pc-lee/Plone/buildout-cache/eggs/collective.cover-1.6b5-py2.7.egg/collective/cover/tiles/list.py", line 142, in is_empty return self.results() == [] File "/home/pc-lee/Plone/buildout-cache/eggs/collective.cover-1.6b5-py2.7.egg/collective/cover/tiles/list.py", line 119, in results ordered_uuids = [(k, v) for k, v in uuids.items()] AttributeError: 'list' object has no attribute 'items'
Could someone help me?