in reply to Re: HTML::Template Plugin
in thread HTML::Template Plugin

I have seeing this before, but none of it shows how to use an external template file with it.

Replies are listed 'Best First'.
Re^3: HTML::Template Plugin
by Anonymous Monk on Feb 14, 2017 at 21:16 UTC
      I looked at this one as well, still I can't see how to use it with an external template file, do you know of any sample code?
        O__O
        use Mojolicious::Lite; plugin 'HTMLTemplateProRenderer'; # Route leading to an action that renders a template get '/' => sub { my $c = shift; $c->stash(one => 23); $c->render(template => 'home', two => 24, handler => 'tmpl'); }; app->start; __DATA__ @@ home.html.tmpl The magic numbers are <tmpl_var one> and <tmpl_var two>.