plone/plone.app.toolbar — comment on commit 30d6e4d4b34217e63f8fcb2624e24e254430b28d
File:  line 0
By lrowe:

> Are you saying that we should do the equivalent of
> alsoProvides(someview, IOverlayed) or similar (in zcml, with browser
> layer of course), and then in IPubAfterTraversal, if
> IOverlayed.providedBy(context) you set the header and change the skin?
> I just want to be sure because I like that idea.

Yes. Specifically you would use something like the following zcml to annotate the view class with the interface:

Then have subscriber for IPubAfterTraversal doing:

def mark_ui_views(event):
request = event.request
view = request['PUBLISHED']
if not IUIView.providedBy(view):
return
request.response.setHeader('X-Theme-Disabled', 'True')
view.context.changeSkin('toolbar', request)