I have an interceptor that executes at the proper point (I can dump and abort from the interceptor) but the event.noLayout() I have in method isn’t running:
any function preRender(event,interceptData){
event.noLayout();
}
I can do:
any function preRender(event,interceptData){
writeDump(‘I see this’);abort;
event.noLayout();
}
I see the dump fine, so my interceptor runs, but when I just have the noLayout() the layout still renders. I have tried this on both defined and implicit views where there is no layout set in the action.
If I set event.noLayout() in the action the layout does not render.
Because that’s too late in the request lifecycle. preRender runs AFTER the view and layout have already been executed, but not “rendered” to the browser. You’ll need to use an interception point that earlier in the flow.
Definition of preRender from the docs:
This occurs after the layout+view is rendered and this event receives the produced content
I can’t imagine how it would have worked in 3.8. The preRender interception point always received the full rendered HTML of the view and they layout which meant both had already been processed.