[Zope3-dev] RE: [Zope3-Users] page uses foreignview:contextchanged

Florian Lindner mailinglists at xgm.de
Sat Apr 16 09:39:01 EDT 2005


Am Samstag, 16. April 2005 13:03 schrieb Roger Ineichen:
> Hi Florian
>
> Behalf Of Florian Lindner
>
> > Sent: Saturday, April 16, 2005 12:34 PM
> > To: dev at projekt01.ch
> > Cc: zope3-dev at zope.org
> > Subject: Re: [Zope3-dev] RE: [Zope3-Users] page uses
> > foreignview:contextchanged
> >
> > Am Samstag, 16. April 2005 11:59 schrieb Roger Ineichen:
> > > Hi Florian
>
> [snip]
>
> > > > > I'm not sure if you have a ViewPageTemplate instance
> > > > > at the view attribute.
> > > > > What do you get if you print out the result of view
> > > > > and index like:
> > > > >
> > > > > print "the view ", view
> > > > > print "the view index ", view.index
> > > > >
> > > > > Can you send me the output?
> > > >
> > > > the view  <zope.app.pagetemplate.simpleviewclass.SimpleViewClass
> > > > from
> > > > /home/florian/Desktop/zope/lib/python/CS/Linklist/browser/skin
> > > > /childInfo.pt
> > > > object at 0xb2e1fc6c>
> > > >
> > > > the view index  <BoundPageTemplateFile of
> > > > <zope.app.pagetemplate.simpleviewclass.SimpleViewClass
> > > > from
> > > > /home/florian/Desktop/zope/lib/python/CS/Linklist/browser/skin
> > > > /childInfo.pt
> > > > object at 0xb2e1fc6c>>
> > >
> > > This looks good.
> > >
> > > Can you send me the ZPT code of childInfo.pt
> > > And the ZCML directive where you register the childInfo.pt
> >
> >     <page
> >         name="childInfo"
> >         for="CS.Linklist.interfaces.ILink"
> >         template="childInfo.pt"
> >         permission="zope.View"
> >         layer="centershock"
> >     />
> >
> >
> > childInfo.pt:
> >
> >
> > <html>
> >   <body>
> >     <metal:block define-macro="childInfo">
> >       <span tal:replace="context/__name__" />
> >     </metal:block>
> >   </body>
> > </html>
> >
> >
> > My requests are also always for the centershock layer
> > (http://localhost:8080/++skin++centershock/...)
>
> What do you get with:
>
> htmlcode += view["childInfo"]

  File 
"/home/florian/Desktop/zope/lib/python/CS/centershock/browser/skin/views.py", 
line 46, in getHTML
    htmlcode += view["childInfo"]
TypeError: cannot concatenate 'str' and 'list' objects


When I change it to htmlcode += view["childInfo"]

Thx,
Florian


More information about the Zope3-dev mailing list