Egg::View::Template - HTML::Template for Egg view.
__PACKAGE__->_egg_config( VIEW => [ [ Template => { path => [qw{ <$e.template> <$e.comp> }], cache => 1, global_vars => 1, die_on_bad_params => 0, ... etc. } ], ], ); # The VIEW object is acquired. my $view= $e->view('Template'); # Associate is set. $view->push_associate( $object ); # Filter is set. $view->push_filter( $filter ); # It outputs it specifying the template. my $content= $view->render('hoge.tmpl', \%option);
It is VIEW to use HTML::Template.
Please add the setting of VIEW to the project to use it.
VIEW => [ [ Template => { ... HTML::Template option. (HASH) } ], ],
* Please refer to the document of HTML::Template for the option to set.
When $e->view('Template') is called, this constructor is called.
Please set %Egg::View::PARAMS directly from the controller to the parameter that wants to be set globally.
%Egg::View::PARAMS= ( %Egg::View::PARAMS, %NewPARAM );
Some default parameters are set by Egg::View::Template::Params.
The parameter that wants to be passed to HTML::Template must use these methods.
The filter is set.
Alias: filter
associate ‚É“n‚· OBJECT ‚ðƒZƒbƒg‚µ‚Ü‚·�B
Alias: associate
TEMPLATE is evaluated and the output result (SCALAR reference) is returned.
It is given priority more than VIEW set of default when OPTION is passed.
my $body= $view->render( 'foo.tmpl', [OPTON_HASH] );
The output result of the receipt from 'render' method is set in $e->response->body.
When TEMPLATE is omitted, acquisition is tried from $view->template. see Egg::View.
If this VIEW operates as default_view, this method is called from '_dispatch_action' etc. by Egg.
$view->output;
HTML::Template, Egg::View, Egg::Template::Param, Egg::Release,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '‚É“n‚·'. Assuming CP1252
To install Egg::Release, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Release
CPAN shell
perl -MCPAN -e shell install Egg::Release
For more information on module installation, please visit the detailed CPAN module installation guide.