On 6/15/11 4:59 AM, David Glick wrote:
[..]

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.

And in case that doesn't work as expected you might be hit by
http://plone.org/documentation/manual/plone-community-developer-documentation/views/layers#problem-with-idefaultbrowserlayer
(which also provides a solution)

Raphael

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