[Zope] Context in a view doesn't see marker interface
Eric Steele
ems174 at psu.edu
Mon Jun 16 10:50:19 EDT 2008
For a project I'm working on, I need to include the (Plone) content
object that a view is called on in the view template, so if I call
mysite/someObject/@@myview, I'll see the someObject page rendered with
some extra bits, mostly through overridden (or additional) viewlets
defined solely for the interface provided by my view.
If I include something along the lines of <tal:block
tal:replace="structure context" /> in my view template, someObject
renders in the browser. The problem is that none of what's in there
appears to recognize the interface that my view provides.
Do I need to do some sort of context wrapping?
(I also had some success creating a page template on the fly,
injecting the current content object's template code into it along
with whatever else I wanted to display, but that just feels icky and
runs afoul of the restriction against python:test calls in views when
calling it on folders and events).
Eric
More information about the Zope
mailing list