[Catalyst] Using $c->view('TT')->render for emails
Ash Berlin
ash_cpan at firemirror.com
Tue Feb 6 23:15:58 GMT 2007
Jim Spath wrote:
> In the docs for Catalyst::View::TT and Catalyst::Plugin::Email, it
> suggests using $c->view('TT')->render() for the rendering of email
> templates.
>
> My issue is that I created my Catalyst view with TTSite as described in
> the CatalystBasics tutorial, and when I call the render method on the
> email template, all of the site templates (header, footer, etc) are
> pulled in, when all I really want is the email template by itself.
>
> What is the right solution? Should I create a new view just for email
> templates? Should I modify my existing view in some way to allow it to
> output both normal site templates and one-off templates?
Any of the above ( tho modify the templates, not the View)
> Should I not use render() for email templates?
No - thats what I and a lot of others use
Ash
More information about the Catalyst
mailing list