> 2nd idea : maybe there is a way to override View (like an AppView for > instance)
You can create your own view classes extending view and set: var $view = 'MyView' in your controller. But I think cake's built-in view class will do the trick: 1. Call render('the-xml-view') 2. Get the rendered view ($this->output) 3. Save the data in a file 4. Empty $this->output 5. Call render with the view the user should get. HTH, - Dardo Sordi. > I don't know of it's possible, but if I were you, I'll check towards > this way > > On 22 oct, 17:08, "Liebermann, Anja Carolin" > <[EMAIL PROTECTED]> wrote: >> Hi djiize, >> >> Thanks for the hint. But my problem with the size of my view would still >> remain. >> >> I guess in the end the view will contain several thousands (litearally) of >> lines in xml and would cause a crash of either php / server / or browser. So >> what I would like to do is write chunks of data from the view output into a >> file while it is generated and not after I have a big servercrashing >> datablob. >> Any idea? >> >> Background information: I program a product information system and in the >> end all gathered data should go to an xml-export file for e.g. a WCMS, >> catalogue or a distributor. >> >> Greetings Anja >> >> -----Ursprüngliche Nachricht----- >> Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von >> djiize >> Gesendet: Mittwoch, 22. Oktober 2008 16:55 >> An: CakePHP >> Betreff: Re: Write view output to file - best MVC approach? >> >> in Controller code, a call to $this->render() returns the content of the >> view HTH >> >> On 22 oct, 15:49, "Liebermann, Anja Carolin" >> >> <[EMAIL PROTECTED]> wrote: >> > Hi everybody, >> >> > I make good progress with my xml-export. >> > Since I expect the output to become very big, I would like to write >> > the resulting view rather to the harddisk to download later than show >> > it on the screen. >> >> > Now my questions: >> > In my controller I have an function which could write strings in a file. >> > But my strings are composed in my view! >> >> > What is the best approach to stay in the MVC world? >> >> > Call the write function form the view? Or transfer all foreach logic >> > to the controller? If I do the second what do I do with strings I have >> > put in elements? >> >> > If I want to avoid an overflow in my RAM do I have to flush something >> > in between? >> >> > Thank you for your opinion and any hints! >> >> > Anja > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---