Selectively remove theme/layout from admin controllers

I have a part that pops open a fancybox from the EditorTemplate which renders an action off of one of my admin controllers. When the action renders the view, it pulls in the admin theme. Is there a way to suppress the layout for an action or
a view so that my content shows up without the header/footer/menu/etc?

Nope, there's nothing on the action, just returns an ActionResult...I swear one time I had the opposite effect, it was not theming and I had to do something to make it happen. Now it's the other way around...

I don't know, I ;m thinking out loud. ActionResult is relatively abstract. You could test a custom result type that executes as a plain string to see if it makes a difference, for debugging purposes. I'm not sure what's going on here. Then again, I *never*
use RenderAction.

I was away from my dev machine last night, so all I could do was post...I just got back and tried to return a string and sure enough, it's not themed...so something with ActionResult causes the theme to be applied, it seems.

Yes, that will be a problem. You could probably hack something together by accessing the layout and/or resource manager through the WorkContext but that would probably mix concerns a little more than reasonable.

Did you consider the possibility of creating a simple helper that populates a shape, and then call Display on that? It would be much more Orchard-like, would enable you to override templates as usual, and would be much cleaner across the board.

So, build a shape, call display on the shape, and then return the ShapeResult? Why would I need a helper method? Is this better because a shape takes on the style from the layout but doesn't include the headers/footers like a full page would?

If I can get a clearer picture of where you're taking this, I can decide if it might actually work for us. I'm all for a cleaner, more orchard-like solution...

Well, the biggest problem is that in the popup, it was putting the admin headers/footers around my content. I wanted to just pull in my content without a theme. So, when I did a RenderPartial, it removed the theme, but then I wasn't able to pull in
my stylesheet. I opted instead to not use the popup and instead pull everything into my part, so it all does it inline on a save of my content item.

So, the original issue is moot, though I'd still like to know how to accomplish it in case we need it for some other task. I'm running into some other issues related to this issue, but I'm going to work on them a bit first before I post more details.