I'm building a CakePHP site where users can press a button to "save this newsletter as HTML". It seemed like a good idea to use a combination of requestAction
and a media view to serve up the content to them, so that they get the exact same content as the live app. The only downside is that requestAction
uses an empty layout, so there are no HTML headers or footers.
Is there an easy way, given a string which contains a body of HTML, to build a new string with the full page contents based upon a given layout?