template with { layout => undef } doesn't seem to work
In the docs it says: For example, to disable the layout for a specific request: get '/' => sub { template 'index.tt', {}, { layout => undef }; }; But when I do this: my $message = template('email/registration_confirmation.tt', { hash => $hash, }, { layout => undef, }, ); The layout is still applied. I am using Dancer-1.3040. Can anyone spot what I'm doing wrong? Thanks, Brian
I just realized I am not using Dancer's layout functionality but instead I'm using Template::Toolkit's so this is not a Dancer problem. Sorry for the noise. On Thu, May 12, 2011 at 8:14 AM, Brian E. Lozier <brian@massassi.com> wrote:
In the docs it says:
For example, to disable the layout for a specific request:
get '/' => sub { template 'index.tt', {}, { layout => undef }; };
But when I do this:
my $message = template('email/registration_confirmation.tt', { hash => $hash, }, { layout => undef, }, );
The layout is still applied. I am using Dancer-1.3040. Can anyone spot what I'm doing wrong?
Thanks, Brian
On 12/05/2011 16:34, Brian E. Lozier wrote:
I just realized I am not using Dancer's layout functionality but instead I'm using Template::Toolkit's so this is not a Dancer problem. Sorry for the noise.
Brian, Are you using TT as a Dancer Plugin? Or are you using it all by yourself? If you are using the TT Dancer Plugin, this might still be a bug :) Cheers
On Thu, May 12, 2011 at 8:14 AM, Brian E. Lozier<brian@massassi.com> wrote:
In the docs it says:
For example, to disable the layout for a specific request:
get '/' => sub { template 'index.tt', {}, { layout => undef }; };
But when I do this:
my $message = template('email/registration_confirmation.tt', { hash => $hash, }, { layout => undef, }, );
The layout is still applied. I am using Dancer-1.3040. Can anyone spot what I'm doing wrong?
Thanks, Brian
_______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
On Thu, May 12, 2011 at 8:40 AM, ambs <ambs+dancer@perl-hackers.net> wrote:
On 12/05/2011 16:34, Brian E. Lozier wrote:
I just realized I am not using Dancer's layout functionality but instead I'm using Template::Toolkit's so this is not a Dancer problem. Sorry for the noise.
Brian,
Are you using TT as a Dancer Plugin? Or are you using it all by yourself?
If you are using the TT Dancer Plugin, this might still be a bug :)
Cheers
I followed this: http://search.cpan.org/~sukria/Dancer-1.3014/lib/Dancer/Cookbook.pod#TT%27s_... So I'm using TT "wrapper" (but yes, I'm also using the TT Dancer plugin). Is there a similar way to disable the wrapper for a specific call to template()?
On Thu, May 12, 2011 at 8:14 AM, Brian E. Lozier<brian@massassi.com> wrote:
In the docs it says:
For example, to disable the layout for a specific request:
get '/' => sub { template 'index.tt', {}, { layout => undef }; };
But when I do this:
my $message = template('email/registration_confirmation.tt', { hash => $hash, }, { layout => undef, }, );
The layout is still applied. I am using Dancer-1.3040. Can anyone spot what I'm doing wrong?
Thanks, Brian
_______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
_______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
I followed this: http://search.cpan.org/~sukria/Dancer-1.3014/lib/Dancer/Cookbook.pod#TT%27s_...
So I'm using TT "wrapper" (but yes, I'm also using the TT Dancer plugin). Is there a similar way to disable the wrapper for a specific call to template()?
Ahs, ok. Do not think so. Just adding a conditional block around it, accordingly with some flag...? no idea...
participants (2)
-
ambs -
Brian E. Lozier