Hi, i now read every documentation about parameters to 'template' and there is, for disable layout I make this one: template 'index.tt', {}, { layout => undef }; Standart use standart layout from config.yml. My idea, is use for some request own or other layout. Now must be some hack to change $app->setting{layout}. I think there was simplest way when you put this my patch. Now in parameter in template, you can use own layout in layout directory. Such as use views/layouts/simple.tt template 'index.tt', {}, { layout => 'simple'}; --- Helpers.pm~ 2010-10-02 14:16:14.000000000 +0200 +++ Helpers.pm 2010-10-02 14:17:06.000000000 +0200 @@ -34,9 +34,8 @@ my $app = Dancer::App->current; - $options ||= {layout => 1}; - my $layout = $app->setting('layout'); - undef $layout unless $options->{layout}; + $options ||= {}; + my $layout = exists($options->{layout} ? $options->{layout} : $app->setting('layout'); $tokens ||= {}; $tokens->{settings} = Dancer::Config->settings;
participants (1)
-
igor.bujna@post.cz