Displaying current context in a view

1 Message Forum Options Options
Embed this topic
Permalink
Eric Steele (esteele)
Displaying current context in a view
Reply Threaded MoreMore options
Print post
Permalink
For a project I'm working on (GloWorm), I need to include the 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 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" />, 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 magic?

(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 feels icky and runs afoul of the restriction against python:test calls in views when calling it on folders and events).