[dancer-users] Disabling main layout
John J. McDermott, CPLP
jjm at jkintl.com
Sat Sep 12 19:33:54 BST 2015
To unset it just for login, try
get '/login' => sub {
template 'login', { path => param('requested_path') }, undef;
};
See
http://search.cpan.org/~sukria/Dancer2-0.10/lib/Dancer2/Manual.pod#template
I believe setting "layout" is global.
--john
On 9/12/2015 12:20 PM, Kadir Beyazlı wrote:
> 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ı <kadirbeyazli at gmail.com> wrote:
>> 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ı <kadirbeyazli at gmail.com> wrote:
>>> 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
>>
>>
>> --
>> Kadir Beyazlı
>> Computer Engineer
>> GSM : +90 535 821 50 00
>
>
--
John J. McDermott, CPLP
Learning and Performance Consultant
jjm at jkintl.com 575/737-8556
Check out my security blog posts <http://cybersecurity.learningtree.com>
Add an A for the Arts To STEM and get STEAM and a strong engine to move
forward.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150912/57bea88b/attachment.html>
More information about the dancer-users
mailing list