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

Florian Lindner mailinglists at xgm.de
Sat Apr 16 10:11:07 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"]

One addition:

print view["childInfo"] gives:

<BoundPageTemplateFile of 
<zope.app.pagetemplate.simpleviewclass.SimpleViewClass 
from /home/florian/Desktop/zope/lib/python/CS/Linklist/browser/skin/childInfo.pt 
object at 0xb6a258ac>>
the viw childInfo:  [('version', '1.5.1'), ('mode', 'html'), ('setPosition', 
(4, 4)), ('setSourceFile', 
'/home/florian/Desktop/zope/lib/python/CS/Linklist/browser/skin/childInfo.pt'), 
('beginScope', {'define-macro': 'childInfo'}), ('optTag', ('metal:block', 
None, 'metal', 0, [('startTag', ('metal:block', [('define-macro', 
'childInfo', 'metal')]))], [('rawtextBeginScope', ('\r\n      ', 6, (5, 6), 
0, {'tal:replace': 'context/__name__'})), ('insertText', (<PathExpr 
standard:'context/__name__'>, [('startEndTag', ('span', [('tal:replace', 
'context/__name__', 'tal')]))])), ('endScope', ()), ('rawtextColumn', ('\r\n    
', 4))])), ('endScope', ())


Florian


More information about the Zope3-dev mailing list