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
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
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