<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
To unset it just for login, try<br>
<pre wrap="">get '/login' => sub {
template 'login', { path => param('requested_path') }, undef;
};
</pre>
See
<a class="moz-txt-link-freetext" href="http://search.cpan.org/~sukria/Dancer2-0.10/lib/Dancer2/Manual.pod#template">http://search.cpan.org/~sukria/Dancer2-0.10/lib/Dancer2/Manual.pod#template</a><br>
<br>
I believe setting "layout" is global.<br>
--john<br>
<br>
<div class="moz-cite-prefix">On 9/12/2015 12:20 PM, Kadir Beyazlı
wrote:<br>
</div>
<blockquote
cite="mid:CACRdqbXDO9RVi7WzjCXdLKoqLuKVvCvwaa0GOO1nYx=roWdQbg@mail.gmail.com"
type="cite">
<pre wrap="">Hi All,
Following worked, but this time main layout was not loaded at other
routes either.
I want main layout not to be loaded for only /login route.
get '/login' => sub {
set 'layout' => undef;
template 'login', { path => param('requested_path') };
};
On Sat, Sep 12, 2015 at 9:15 PM, Kadir Beyazlı <a class="moz-txt-link-rfc2396E" href="mailto:kadirbeyazli@gmail.com"><kadirbeyazli@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi All,
I tried following but it did not work, I need something similar to it.
get '/login' => sub {
config->{layout} = undef;
template 'login', { path => param('requested_path') };
};
On Sat, Sep 12, 2015 at 9:01 PM, Kadir Beyazlı <a class="moz-txt-link-rfc2396E" href="mailto:kadirbeyazli@gmail.com"><kadirbeyazli@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi All,
I think I saw solution at mails but could not find at my search so I have to
ask here.
I set main layout.
But I don't want main layout to be loaded at route /login.
Is it possible disabling main layout at route /login although I am using
template in it?
get '/login' => sub {
template 'login', { path => param('requested_path') };
};
--
Kadir Beyazlı
GSM : +90 535 821 50 00
</pre>
</blockquote>
<pre wrap="">
--
Kadir Beyazlı
Computer Engineer
GSM : +90 535 821 50 00
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
John J. McDermott, CPLP<br>
Learning and Performance Consultant<br>
jjm at jkintl.com 575/737-8556<br>
Check out my <a href="http://cybersecurity.learningtree.com">
security blog posts</a><br>
Add an A for the Arts To STEM and get STEAM and a strong engine to
move forward. </div>
</body>
</html>