[Zope3-Users] Folder listing

Florian Lindner mailinglists at xgm.de
Wed Dec 1 08:28:43 EST 2004


Hello,
as said on the the previous thread I am now trying to create a page 
template for the folder listing.

I'm trying to do that with this ZPT code:

<div tal:repeat="item context/items">
   Title:<span tal:replace="item/name">Testtitle</span><br />
   Desc:<span tal:replace="item/description">beschreibung</span><br />
   Location:<span tal:replace="item/location">Location</span><br />
</div>

Registered as followed:

	<page
		name="listing.html"
		for="CS.interfaces.IEventFolder"
		template="folderlisting.pt"
		permission="zope.View"
		layer="centershock"
	/>

IEventFolder contains only object of types IEvent.

class IEvent(Interface):
     name = TextLine(
         title = u"Name",
         description = u"Short name",
         required = True)

     description = Text (
         title = u"Description",
         description = u"Longer description of the event",
         default = u"",
         required = False)

     location = Text (
         title = u"Location",
         description = u"The location where the event take place.",
         default = u"",
         required = False)

Do I really need a supporting view class or can I read the Schema-fields 
directly from the ZPT?

The error message is:

tuple indices must be integers

At the first mention of item/name.

Thanks,

Florian


More information about the Zope3-users mailing list