Catalyst::View::ClearSilver - ClearSilver View Class
Use the helper:
create.pl view ClearSilver ClearSilver
Which generates lib/MyApp/View/ClearSilver.pm:
lib/MyApp/View/ClearSilver.pm
package MyApp::View::ClearSilver use base 'Catalyst::View::ClearSilver'; 1;
Configure it to your liking:
MyApp->config->{View::ClearSilver} = { INCLUDE_PATH => ['/path/to/loadpath', '/path/to/anotherpath'], TEMPLATE_EXTENSION => '.cs', # .cs is the default # optional: INCLUDE_HDF => ['mydata1.hdf', 'mydata2.hdf'], };
Then use it:
$c->forward('MyApp::View::ClearSilver'); my $out = $c->view('ClearSilver')->render('template.cs'); # etc.
This is the ClearSilver view class. It works like Catalyst::View::Templated, so refer to that for more details on what config options and methods you can use.
ClearSilver
You can't call back into your application from ClearSilver, so most of the attributes in $c will be worthless. Be sure to pre-compute anything you need and put it in the stash before rendering.
$c
$c will not be included in your HDF at all, and hence the CATALYST_VAR config option is ignored. Setting it is a fatal error.
CATALYST_VAR
Renders the selected template and stores the result as the response body.
Renders $template and returns the result
$template
Sets the template to render, or returns the template that will be rendered.
Called by Catalyst. Sets up the config (mapping 0.01 config variables to 0.02 names).
added to hdf.loadpaths. default is $c->config->{root} only.
$c->config->{root}
HDF Dataset files into the current HDF object.
a sufix to add when looking for templates bases on the match method in Catalyst::Request.
match
Jiro Nishiguchi <jiro@cpan.org>
<jiro@cpan.org>
Jonathan Rockway <jrockway@cpan.org>
<jrockway@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Catalyst, Catalyst::View::Templated, ClearSilver
ClearSilver Documentation: http://www.clearsilver.net/docs/
To install Catalyst::View::ClearSilver, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::View::ClearSilver
CPAN shell
perl -MCPAN -e shell install Catalyst::View::ClearSilver
For more information on module installation, please visit the detailed CPAN module installation guide.