[Fwd: RE: SV: [Zope] Adding attributes to PageTemplateFile]

Chris Withers chrisw at nipltd.com
Fri Sep 12 09:43:58 EDT 2003


Think this was meant for the list...

-------- Original Message --------
Subject: RE: SV: [Zope] Adding attributes to PageTemplateFile
Date: Fri, 12 Sep 2003 15:51:02 +0200
From: volker.wend at efgbsh.de
To: chrisw at nipltd.com

He folks,

I have a similar Problem: I want to add a selection attribute to a 'normal'
Page Template. This doesn't work either. I add an attribute called "mytest"
with type "selection" and value "getImages", getImages is a Python script
that returns all Images in the current folder.

getImages:
return [''] + context.objectIds(['Image','Photo'])

The error message:

Zope has encountered an error while publishing this resource.

Error Type: TypeError
Error Value: can only concatenate list (not "tuple") to list

If I add the attribute with a script, I get the error when I try to display
the property page.

Any Ideas ?

Regards,
Volker




 > -----Original Message-----
 > From: Chris Withers [mailto:chrisw at nipltd.com]
 > Sent: Freitag, 12. September 2003 15:18
 > To: Carsten Gehling
 > Cc: Josef Albert Meile; zope at zope.org
 > Subject: Re: SV: [Zope] Adding attributes to PageTemplateFile
 >
 >
 > Carsten Gehling wrote:
 > > Sorry, it isn't an "Attribute Error", it is of course a "Key Error":
 > >
 > > Error Type: KeyError
 > > Error Value: software_type_list
 > >
 > > - Carsten
 >
 > If you do this, you need to iterate over
 > template/software_type_list... Chris
 >
 >
 > _______________________________________________
 > Zope maillist  -  Zope at zope.org
 > http://mail.zope.org/mailman/listinfo/zope
 > **   No cross
 > posts or HTML encoding!  **
 > (Related lists -
 >  http://mail.zope.org/mailman/listinfo/zope-announce
 >  http://mail.zope.org/mailman/listinfo/zope-dev )
 >






More information about the Zope mailing list