# NAME

Jedi::Plugin::Template - Jedi Plugin for Template Toolkit

# VERSION

version 0.04

# DESCRIPTION

This will add missing route to catch public file if exists.

This will also give a "jedi\_template" method to display your template.

To use it in your Jedi app :

	package MyApps;
	use Jedi::App;
	use Jedi::Plugin::Template;

	sub jedi_app {
		...
		$jedi->get('/bla', sub {
			my ($jedi, $request, $response) = @_;
			$response->body($jedi->jedi_template('test.tt'), {hello => 'world'}, 'main.tt');
			return 1;
		})
	}

	1;

Here the structure of your app :

	.
	./bin/app.psgi
	./config.yml
	./environments
	./environments/prod.yml
	./views
	./view/test.tt
	./view/layouts/main.tt
	./public

The main.tt look like

	<html>
	<body>
	This will wrap your content :
	

	[% content %]
	</body>
	</html>

And your test.tt :

	<p>Hello [% hello %]</p>

Take a look here : [Jedi::Plugin::Template::Role](http://search.cpan.org/perldoc?Jedi::Plugin::Template::Role)

# METHODS

## import

This module is equivalent into your package to :

	package MyApps;
	with "Jedi::Plugin::Template::Role";

# BUGS

Please report any bugs or feature requests on the bugtracker website
https://tasks.celogeek.com/projects/perl-modules-jedi

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

# AUTHOR

celogeek <me@celogeek.com>

# COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by celogeek <me@celogeek.com>.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
