On 6/14/11 6:10 PM, Andreas Jung wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For Collage I have the requirement for a new display option for
arbitrary pieces of content used within a Collage instance where
the related content piece should be rendered using the "standard"
browser view configured in Collage for this particular content-type but
with an outer DIV with a special class.

Registering an additional view my-view is not the problem...the problem
is how to call to get hold of the "standard" browser view from within
the browser view class implementing "my-view". To be more clear:

How can I lookup a named view ('standard in this case) for an object
(aka 'context'), the current request *and* a specific browser layer
(ICollageBrowserLayer in this case)?

The standard approaches using restrictedTraverse() and getMultiAdapter()
don't take the browser layer into account..any idea how to solve this?
I guess you need to mark the request with the browser layer using alsoProvides before you do restrictedTraverse or getMultiAdapter, and then remove it with noLongerProvides afterward.
David


----------              
David Glick
Web Developer
[email protected]
206.286.1235x32

GiveBIG is coming! Give to Groundwire on June 23 and The Seattle Foundation 
will stretch your money!

http://www.groundwire.org/blog/give-big-is-coming


_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to