2012-01-23 5 views
0

を働いていない別のレイアウトを使用して、コントローラは私がここにpdf.ctp</p> <p>を作成したレイアウトを使用したい私のダウンロードアクションの

function download($id = null) { 
     $this->layout = 'pdf'; 
     // Include Component 
     App::import('Component', 'Pdf'); 
     // Make instance 
     $Pdf = new PdfComponent(); 
     // Invoice name (output name) 
     $Pdf->filename = 'contract'; // Without .pdf 
     // You can use download or browser here 
     $Pdf->output = 'download'; 
     $Pdf->init(); 
     // Render the view 
     $Pdf->process(Router::url('/', true) . 'pv/pdf_contract/'); 
     $this->render(false); 
    } 

が、そのはまだデフォルトのレイアウトを使用しての私の行動です。 わからない理由 ありがとう

答えて

0

私はそれを理解しました。私は$ this-> layout = falseを参照メソッドに必要とし、実際のダウンロードメソッドでは必要ありませんでした。 ありがとう

関連する問題