El 03/03/11 14:47, Victor Churchill escribió:
I am taking my first steps from Base Camp 1 of the Catalyst learning
curve. I am trying to add PDF capability to the standard Books app of
the tutorial. The PDF view appears to be running but is not returning
any content.
As per the C::V::P::R docs, I have:
In ~/Catalyst/MyApp, run script/myapp_create.pl view PDF::Reuse PDF::Reuse
In ~/Catalyst/MyApp/lib/MyApp.pm, added:
# Configure PDF generator view
__PACKAGE__->config('View::PDF::Reuse' => {
INCLUDE_PATH => __PACKAGE__->path_to('root','src','books')
});
I think INCLUDE_PATH should not include the last 'books' path part. It's
taken from the controller name.
If your template base is root/src, the controller is Books.pm, the
action id "pdf", the template should be in root/src/books/pdf.tt
This works for me :-)
regards
J.
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/