Looking for advice…and a question.
My question: Is there a way to intercept the html, from a controller, before it is fully sent to the browser? Ex: After all containers, blocks, etc. are rendered.
Background…i have page templates which are used in page types. Users, using the “output” option can modify how the pages render and what content is included. I generate one apartment container/section for each apartments that is assigned to that page. Everytime the page is loaded, i need to validate that apartment has a container, if not, create one. If an apartment has been removed from the property, i need to remove it from the patch.
The catch is that i need the page to be fully in-place editable after it’s rendered so that people can make changes to it on the fly.
So basically i want to intercept the page, add/remove containers/blocks as needed, then render it.
Any recommended approaches?