[Product-Developers] Traversing to an object like the publisher does
wichert at wiggy.net
Fri May 15 12:08:16 UTC 2009
Previously Jan Hackel wrote:
> On Thursday 14 May 2009 Jan Hackel wrote:
> > >> I need to write a test that essentially needs to traverse to an
> > >> operation like the following tal-expression would:
> > >>
> > >> tal:condition="context/@@plone_context_state/is_view_template"
> > >
> > >context.restrictedTraverse('@@plone_context_state').is_view_template()
> > >
> > >Hedley
> > Well, thanks! While I am pretty sure I tried that, it now works...
> I was a bit to fast with celebrations. The problem with "restrictedTraverse"
> is that it will not trigger registered IPublishTraverse adapters. I need those
> however. Any other suggestions?
There is no routine to do that (see the discussion on zope-dev this
Wichert Akkerman <wichert at wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
More information about the Product-Developers