cakephp - use different layout not working -



cakephp - use different layout not working -

for download action want utilize layout created pdf.ctp

here action in controller

function download($id = null) { $this->layout = 'pdf'; // include component app::import('component', 'pdf'); // create instance $pdf = new pdfcomponent(); // invoice name (output name) $pdf->filename = 'contract'; // without .pdf // can utilize download or browser here $pdf->output = 'download'; $pdf->init(); // render view $pdf->process(router::url('/', true) . 'pv/pdf_contract/'); $this->render(false); }

but still using default layout. not sure why thanks

i figured out. needed $this->layout=false in referencing method , not in actual download method. thanks

cakephp cakephp-2.0

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -