the task (csv) a custom toolbar
in the default view exportcsv/view.html.php, I check if the export toobar as been clicked.
Code: Select all
$is_export = JFactory::getApplication()->input->get('task', '');
if ($is_export == 'csv') {
ExporterViewExportcsv::export_csv($items);
}
The problem didn't happen when I tried just with an
echo '*** I am in Export-CSV ***'; in export_csv.
That why I thought the logic was OK.
The task problem happens when I put the file export code, which begins with @ob_end_clean(); some headers (e.g. header("Content-Type: application/octet-stream");) and ends with an exit();
The export works though.
Maybe I have to change the logic.... and really make a view just for the export and not make an if-condition in the default view.