views for shell scripts

2008-08-19 Thread JuergenRiemer
like so: $htmlReport = $this-render( VIEWS.'/elements/shells/report.ctp' ); and then use php fwrite to write it to the harddisk. Yet I get the message that ReportShell::render() is not defined. What do I have to import? Or is there a better way to make use of views in shell scripts? thx Juergen

Re: views for shell scripts

2008-08-19 Thread Daniel Hofstetter
it to the harddisk like so: $htmlReport = $this-render( VIEWS.'/elements/shells/report.ctp' ); and then use php fwrite to write it to the harddisk. Yet I get the message that ReportShell::render() is not defined. What do I have to import? Or is there a better way to make use of views in shell scripts

Re: views for shell scripts

2008-08-19 Thread JuergenRiemer
Super, thanks Daniel for pointing me the Core *g* works like a charm now! App::import('Core', array('View', 'Controller')); $view = new View(new Controller()); $viewContent = $view-render('/elements/view_name'); --~--~-~--~~~---~--~~ You received this message