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*
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@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
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@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@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
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
Hi All, I solved my problem by adding control to main layout to hide links which sHould be visible to users who logged in. main.tt # my logo here <% IF session.user %> menubar # should be visible to only logged users <% END %> On Sat, Sep 12, 2015 at 9:20 PM, Kadir Beyazlı <kadirbeyazli@gmail.com> 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@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@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
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
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@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@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.
Hi John, Yes it worked as follow, thanks. template 'login', { path => param('requested_path') }, { layout => undef }; On Sat, Sep 12, 2015 at 9:33 PM, John J. McDermott, CPLP <jjm@jkintl.com> wrote:
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@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@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 Add an A for the Arts To STEM and get STEAM and a strong engine to move forward.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
Here's a recipe I created some time ago for setting different layouts for different routes, including no layout at all. http://stackoverflow.com/questions/18198270/more-than-one-layout-wrapper-wit... Sent from my mobile. Please excuse brevity & typos.
On Sep 12, 2015, at 11:49 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
Hi John,
Yes it worked as follow, thanks.
template 'login', { path => param('requested_path') }, { layout => undef };
On Sat, Sep 12, 2015 at 9:33 PM, John J. McDermott, CPLP <jjm@jkintl.com> wrote: 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@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@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 Add an A for the Arts To STEM and get STEAM and a strong engine to move forward.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00 _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
The solution I usually use is keeping routes using different layout in different Apps. In my opinion, if you have something important as the layout changing, It's not wrong to keep these routes in different modules. For the situation described in the mail, where we have just to turn off links, probably an IF in the template should be enough... Simone Faré http://perlishscrewdriver.blogspot.com http://www.strehler-cms.org/ Il giorno Sat, 12 Sep 2015 12:12:45 -0700 Hermann Calabria <hermann@ivouch.com> ha scritto:
Here's a recipe I created some time ago for setting different layouts for different routes, including no layout at all.
http://stackoverflow.com/questions/18198270/more-than-one-layout-wrapper-wit...
Sent from my mobile. Please excuse brevity & typos.
On Sep 12, 2015, at 11:49 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
Hi John,
Yes it worked as follow, thanks.
template 'login', { path => param('requested_path') }, { layout => undef };
On Sat, Sep 12, 2015 at 9:33 PM, John J. McDermott, CPLP <jjm@jkintl.com> wrote: 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@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@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 Add an A for the Arts To STEM and get STEAM and a strong engine to move forward.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00 _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
Hi, Where does Dancer2 get the user that is returned with $dsl->app->request->user? I have a hard time finding this in Dancer2::Core::Request.pm, where it's in the documentation. Kind regards, Arjan.
Hi Cymon, On Sun, Sep 13, 2015 at 1:11 AM, Cymon <cymon.ML@gmail.com> wrote:
The solution I usually use is keeping routes using different layout in different Apps. In my opinion, if you have something important as the layout changing, It's not wrong to keep these routes in different modules.
At my project there is only 1 application and main layout is set at config.yml. If I use 2nd application, will it have a different config file?
For the situation described in the mail, where we have just to turn off links, probably an IF in the template should be enough...
Simone Faré http://perlishscrewdriver.blogspot.com http://www.strehler-cms.org/
Il giorno Sat, 12 Sep 2015 12:12:45 -0700 Hermann Calabria <hermann@ivouch.com> ha scritto:
Here's a recipe I created some time ago for setting different layouts for different routes, including no layout at all.
http://stackoverflow.com/questions/18198270/more-than-one-layout-wrapper-wit...
Sent from my mobile. Please excuse brevity & typos.
On Sep 12, 2015, at 11:49 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
Hi John,
Yes it worked as follow, thanks.
template 'login', { path => param('requested_path') }, { layout => undef };
On Sat, Sep 12, 2015 at 9:33 PM, John J. McDermott, CPLP <jjm@jkintl.com> wrote: 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@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@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 Add an A for the Arts To STEM and get STEAM and a strong engine to move forward.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00 _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
Hi Hermann, I read and understood your method but following method offered by John works for which you wrote is not good idea to use. I am copying the comment existing at your link: Since Dancer's native layout is disabled, this does not work: template('mytemplate', { ... }, { layout => 'some_other_layout' }); # NO GOOD native layout is not disabled. I see that that main layout works for other routes On Sat, Sep 12, 2015 at 10:12 PM, Hermann Calabria <hermann@ivouch.com> wrote:
Here's a recipe I created some time ago for setting different layouts for different routes, including no layout at all.
http://stackoverflow.com/questions/18198270/more-than-one-layout-wrapper-wit...
Sent from my mobile. Please excuse brevity & typos.
On Sep 12, 2015, at 11:49 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
Hi John,
Yes it worked as follow, thanks.
template 'login', { path => param('requested_path') }, { layout => undef };
On Sat, Sep 12, 2015 at 9:33 PM, John J. McDermott, CPLP <jjm@jkintl.com> wrote: 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@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@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 Add an A for the Arts To STEM and get STEAM and a strong engine to move forward.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00 _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
participants (5)
-
arjan -
Cymon -
Hermann Calabria -
John J. McDermott, CPLP -
Kadir Beyazlı