# Dancer-Template-TemplateDeclare **Repository Path**: mirrors_gitpan/Dancer-Template-TemplateDeclare ## Basic Information - **Project Name**: Dancer-Template-TemplateDeclare - **Description**: Read-only release history for Dancer-Template-TemplateDeclare - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-10-20 - **Last Updated**: 2026-03-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # NAME Dancer::Template::TemplateDeclare - Template::Declare wrapper for Dancer # VERSION version 0.3.2 # SYNOPSIS # in 'config.yml' template: 'TemplateDeclare' engines: TemplateDeclare: dispatch_to: - A::Template::Class - Another::Template::Class # in the app get '/foo', sub { template 'foo' => { title => 'bar' }; }; # DESCRIPTION This class is an interface between Dancer's template engine abstraction layer and the [Template::Declare](http://search.cpan.org/perldoc?Template::Declare) templating system. In order to use this engine, set the template to 'TemplateDeclare' in the configuration file: template: TemplateDeclare # Template::Declare CONFIGURATION Parameters can also be passed to the [Template::Declare](http://search.cpan.org/perldoc?Template::Declare) interpreter via the configuration file, like so: engines: TemplateDeclare: dispatch_to: - Some::Template - Some::Other::Template All the dispatch classes are automatically loaded behind the scene. # USING LAYOUTS If the layout is set to _$name_, the template `/layout/$name` will be used and passed via the `content` argument. For example, a simple `main` layout would be: template '/layout/main' => sub { my ( $self, $args ) = @_; html { body { outs_raw $args->{content} } } }; # SEE ALSO [Dancer](http://search.cpan.org/perldoc?Dancer), [Template::Declare](http://search.cpan.org/perldoc?Template::Declare). # AUTHOR Yanick Champoux # COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Yanick Champoux. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.