[Catalyst] [Beginner] C::V::Email::Template does not render

Ekki Plicht (DF4OR) ep at plicht.de
Sun Sep 12 20:55:02 GMT 2010


Am Sonntag 12 September 2010, 22:36:59 schrieb Devin Austin:
> On Sun, Sep 12, 2010 at 2:14 PM, Ekki Plicht (DF4OR) <ep at plicht.de> wrote:
> > 
> > template looks like this:
> >        [% c.localize('mm_reghello') %]
> >        [% c.localize('mm_regsent') %]
> >        [% c.uri_for('/user/registration') %]/[% c.digest %]
> >        [% c.localize('mm_regfinal') %]
> >        [% PROCESS mailsig.tt %]
> > 
> > What I receive as mail is:
> >        mm_reghello
> >        mm_regsent
> >        http://localhost:3000/user/registration/
> >        mm_regfinal
> >        --
> >        The mail signature as intended.
> > 
> > I.e. the localization does not work (it does fine on the web templates)
> > and the digest code is missing after the URI. The placeholders 'mm_*'
> > are all defined and available in various .po files. Other stash
> > variables, which I put
> > into the mail template for testing pruposes, are also missing in the
> > rendered
> > output.

> What do your web templates look like?

Here is for example the /user/register template (register.tt). And as 
mentioned, this works fine, with all translations with [% c.localize('text') 
%].


[% WRAPPER outerwrap.tt %]
[% META
   title  = 'Registration'
   addcss = 'login.css'
%]
<!-- [% IF err %][% err %][% END %] -->
<div id="login">
    <h1>Register</h1>
    [% IF ! c.user_exists %]
        <form action="[% c.uri_for('/user/register') %]"
         method="post"
         accept-charset="utf-8">
        <label for="email">[% c.localize('us_email') %]</label>
        <input type="text" name="email" value="" id="email" />
        [% IF errors.email %]
            <span class="error">[% c.localize(errors.email) %]</span>
        [% END %]
        <input type="submit" value="[% c.localize('us_sendmail') %] &rarr;" 
id="submit" />
        </form>
        <p class="registerinfo">[% c.localize('us_registerinfo') %]</p>
    [% ELSE %]
        <p>[% c.localize('us_alreadyregistered') %]</p>
    [% END %]
</div>
[% END %]


Cheers,
Ekki



More information about the Catalyst mailing list