X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=README;h=7b94ee1cb8ac1fe9caa112067354cb0299595e12;hb=8cd017a801022dffbc26e7c6f8f5e91475d968a3;hp=3d9a4453f3dfd685dbf355eb37e6c49780d08904;hpb=caa615179a9d7976f7c657388e0acb2df3ddb9c3;p=catagits%2FCatalyst-View-TT.git diff --git a/README b/README index 3d9a445..7b94ee1 100644 --- a/README +++ b/README @@ -14,24 +14,53 @@ SYNOPSIS 1; + # Meanwhile, maybe in an '!end' action $c->forward('MyApp::View::TT'); DESCRIPTION This is the "Template" view class. Your subclass should inherit from - this class. If you want to override TT config settings, you can do it - there by setting __PACKAGE__->config->{OPTION} as shown in the synopsis. - Of interest might be EVAL_PERL, which is disabled by default, and - LOAD_TEMPLATES, which is set to use the provider. + this class. The plugin renders the template specified in + "$c->stash->{template}" or "$c->request->match". The template variables + are set up from the contents of "$c->stash", augmented with "base" set + to "$c->req->base", "c" to $c and "name" to "$c->config->{name}". The + output is stored in "$c->response->output". + + If you want to override TT config settings, you can do it there by + setting "__PACKAGE__->config->{OPTION}" as shown in the synopsis. Of + interest might be "EVAL_PERL", which is disabled by default, and + "LOAD_TEMPLATES", which is set to use the provider. If you want to use EVAL perl, add something like this: __PACKAGE__->config->{EVAL_PERL} = 1; __PACKAGE__->config->{LOAD_TEMPLATES} = undef; + If you have configured Catalyst for debug output "Catalyst::View::TT" + will enable profiling of template processing (using "Template::Timer". + This will cause HTML comments will get embedded in the output from your + templates, such as: + + + + + + + + .... + + + + You can supress template profiling when debug is enabled by setting: + + __PACKAGE__->config->{CONTEXT} = undef; + METHODS process - Renders the template specified in $c->stash->{template} or - $c->request->match to $c->response->output. + Renders the template specified in "$c->stash->{template}" or + "$c->request->match". Template variables are set up from the contents of + "$c->stash", augmented with "base" set to "$c->req->base", "c" to $c and + "name" to "$c->config->{name}". Output is stored in + "$c->response->output". config This allows your view subclass to pass additional settings to the TT @@ -41,7 +70,7 @@ SEE ALSO Catalyst. AUTHOR - Sebastian Riedel, "sri@cpan.org" Marcus Ramberg + Sebastian Riedel, "sri@cpan.org" Marcus Ramberg, "mramberg@cpan.org" COPYRIGHT This program is free software, you can redistribute it and/or modify it