diff --git a/CHANGES b/CHANGES index 62ff3d379..76358d96e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,13 @@ +1.3079_04 02.10.2011 + + [ ENHANCEMENTS ] + * PSGI handler code cleaned up (chromatic). + * Improved warning localizations (chromatic). + + [ DOCUMENTATION ] + * Dancer::Plugins typos (Olof Johansson). + * PSGI handler documented (chromatic). + 1.3079_03 10.09.2011 [ ENHANCEMENTS ] diff --git a/lib/Dancer.pm b/lib/Dancer.pm index 3a9518477..3efb3b9e8 100644 --- a/lib/Dancer.pm +++ b/lib/Dancer.pm @@ -5,7 +5,7 @@ use warnings; use Carp; use Cwd 'realpath'; -our $VERSION = '1.3079_03'; +our $VERSION = '1.3079_04'; our $AUTHORITY = 'SUKRIA'; use Dancer::App; @@ -1582,6 +1582,12 @@ For example, to disable the layout for a specific request: template 'index.tt', {}, { layout => undef }; }; +Or to request a specific layout, of course: + + get '/user' => sub { + template 'user.tt', {}, { layout => 'user' }; + }; + Some tokens are automatically added to your template (C, C, C, C, C, C and, if you have sessions enabled, C). Check diff --git a/lib/Dancer/Config.pm b/lib/Dancer/Config.pm index 92cb2259f..b6eecb26a 100644 --- a/lib/Dancer/Config.pm +++ b/lib/Dancer/Config.pm @@ -417,6 +417,9 @@ use Template Toolkit, add the following to C: The name of the layout to use when rendering view. Dancer will look for a matching template in the directory $views/layout. +Your can override the default layout using the third argument of the +C