I have a simple form where I do not want to render most of the main template with its viewlet managers, but I do want to show just the plone.logo viewlet here. The guide here https://docs.plone.org/develop/plone/views/viewlets.html#rendering-viewlet-by-name gets me most of the way there, except that it doesn't seem to consider browser layer. Indeed in getViewletByName I can debug and see that there are two viewlets with the plone.logo name - one is the default, and the other is my custom one (with some changes to how the logo viewlet works). When rendering most pages, my custom logo viewlet is indeed shown, so I know that the browser layer is properly installed.
One thing I had tried to do was to just call the custom viewlet's class directly, update it, and render it. That works, but isn't browserlayer-aware either. I want my custom page w/viewlet to get the top layer for plone.logo, which will be defined elsewhere.
I ended up taking a different approach. I specified a viewletmanager, updated, and extracted the appropriate viewlet from it. I believe this lets the viewletmanager handle the browser layering.