NAME
Dancer2::Template::Xslate - Text::Xslate template engine for Dancer2
SYNOPSIS
config.yaml
:
template: Xslate
A Dancer 2 application:
use
Dancer2;
get
'/page/:number'
=>
sub
{
my
$page_num
= params->{number};
template
"foo.tx"
, {
page_num
=>
$page_num
};
};
METHODS
- render($template, $tokens)
-
Renders a template.
$template
can be one of:a string of the path to a template file (*.tx, not *.tt like the core Dancer2 template engines)
a reference to a string containing prerendered template content
SEE ALSO
- Dancer::Template::Xslate
-
Xslate rendering engine for Dancer 1.
AUTHOR
Richard Simões <rsimoes AT cpan DOT org>
COPYRIGHT AND LICENSE
Copyright © 2013 Richard Simões. This module is released under the terms of the MIT License and may be modified and/or redistributed under the same or any compatible license.