in reply to Re^5: HTML::Template Plugin
in thread HTML::Template Plugin
#!/usr/bin/env perl use Mojolicious::Lite; plugin 'HTMLTemplateProRenderer'; # Route leading to an action that renders a template get '/test' => sub { my $c = shift; $c->stash(one => 23); $c->render(template => 'index', two => 24, handler => 'tmpl'); }; app->start;
<html> <head><title>Test Template</title> <body> Value ONE = <TMPL_VAR one> <p> Value TWO = <TMPL_VAR two> </body> </html>
|
|---|