-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need extra line of code in one of the examples #25
Comments
Can you paste the whole snippet? I dont know which one you are referring to. |
// In your routes.php file:
Router::parseExtensions('csv');
// In your controller:
public $components = array(
'RequestHandler' => array(
'viewClassMap' => array('csv' => 'CsvView.Csv)
)
);
public function export() {
$posts = $this->Post->find('all');
$_serialize = 'posts';
$_header = array('Post ID', 'Title', 'Created');
$_extract = array('Post.id', 'Post.title', 'Post.created');
$this->set(compact('posts', '_serialize', '_header', '_extract'));
} |
We just updated the docks so it would work properly. The docs you just On Fri, Mar 7, 2014 at 1:40 PM, Paul Morriss notifications@github.comwrote:
|
Thanks for sorting that out. However there's a missing close quote after CsvView.Csv. |
Fixed with #27 |
I'm using Cake PHP 2.4.5. When I used the code as you have in the snippet above the line
I found that I also needed the line
otherwise I got the error
View file "\app\View\csv\export.ctp" is missing.
The text was updated successfully, but these errors were encountered: