I need to know of a way to intercept the output from my view file before it merges that content with the default layout. How can I get the view file contents so that I can manipulate them as I need to?
On Jun 2, 6:58 pm, timtrice <[email protected]> wrote: > I actually almost have it (I think). > > I'm trying to catch the output before it's actually ouput. That's > where I need to mix with the xsl and the stylesheet. The problem is I > can't find the actual content. If I load the file into a variable, > set that variable, I can catch it in beforeRender. Then I can send it > to the Xslt component and mix and match and get my desired "output". > Problem is, the xml is actually output into the view (because it's in > the default view file). > > The only thing stopping me (I hope) from finishing at least a basic > component is getting the actual output from the view file and mixing > it with the xsl before it's actually shown. Still working on that. > Have any ideas? > > On Jun 2, 2:41 pm, Miles J <[email protected]> wrote: > > > Ok lets see here: > > > Controller action - Should set() an array to the view and in the view > > you parse the array to xml (this is your xml file). You would then > > also set which xslt file it should be aswell. > > > function index() { > > $this->set('users', $this->User->find('all')); > > $this->set('xslt', '/xslt/index.xsl'); > > $this->header('Content-type: text/xml'); > > > } > > > View - In the view just loop the array and create an xml and other > > properties you need. > > > The hard part here is linking the xml to an xslt sheet. You could > > create a controller called Xslt and create an action for each layout. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
