On Nov 26, 4:53 pm, vg <[email protected]> wrote: > Is it possible to intercept the HTML in afterFilter (or any other > routine) so that after the view is rendered, you can do a search > +replace on something?
Are you talking about the entire HTML output including the layout, or just the current view? If you want the entire HTML of the page pre-render time, then you can get it from a custom app_controller::beforeRender() in the $output property as $this->output. If you just want to modify the output from the view, that's a little trickier and is something I'm looking into myself. What I want to do is have an optional wrapper for a view, to help in templating. Right now I'm working my way through the view controller to see how I can best achieve this. What I'm attempting needs to be done before the view output is added to the layout, so beforeRender won't work as the output at that stage is already combined with the layout. It may require, and also in your case may be best to, building a helper to allow for the modification of output from the view. Feel free to hit me up at my email addy if you have any thoughts on this. Puk! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
