Page 1 of 1
Hide Side bar on login page only
Posted: Mon May 27, 2024 8:42 pm
by andyrav
Hi
I want to only hide the left side menu on the login page.
I have added
$('[data-widget="pushmenu"]').PushMenu('collapse');
to login page> startupscript
which works, but how to i reset it back to default after login?
thanks
Re: Hide Side bar on login page only
Posted: Mon May 27, 2024 9:07 pm
by arbei
You better add the 'sidebar-collapse' CSS class to body tag instead.
Re: Hide Side bar on login page only
Posted: Tue May 28, 2024 4:16 pm
by andyrav
tied adding
$("body").addClass("sidebar-collapse")
to login page> startupscript
this didnt work
any idea?
i only want the sidebar closed on login
thanks
Re: Hide Side bar on login page only
Posted: Tue May 28, 2024 4:55 pm
by arbei
You may search "sidebar-collapse" in this forum.
Re: Hide Side bar on login page only
Posted: Thu May 30, 2024 2:30 am
by andyrav
Hi
Can you point me in the write direction
i can get it to be closed on the login page, but then once logged in it is still closed. i would like it open after you log in
thanks
Re: Hide Side bar on login page only
Posted: Wed Jun 05, 2024 3:23 am
by SOHIB
simply you can tick no heard/footer while generating in front of login.php
Re: Hide Side bar on login page only
Posted: Sun Jun 09, 2024 9:22 pm
by onoboa
Hi,
I use this code in Client Scripts -> Other -> Login Page -> Client Script
$('[data-widget="pushmenu"]').PushMenu('collapse');
$(".main-header").remove();
PHPMaker v2021
I hope it helps you,
Omar
Re: Hide Side bar on login page only
Posted: Sun Jun 09, 2024 9:37 pm
by onoboa
to restore to default in another pages.
Client Script -> Global -> Pages with header/footer
$('[data-widget="pushmenu"]').PushMenu('expand');
Re: Hide Side bar on login page only
Posted: Thu Jun 13, 2024 6:24 pm
by andyrav
tried adding
$('[data-widget="pushmenu"]').PushMenu('expand');
to client,starup and global
but it does not reopen the left menu bar
any ideas?
thanks
Re: Hide Side bar on login page only
Posted: Thu Jun 13, 2024 7:25 pm
by mobhar
You may simply put this following code in Client Scripts -> Global -> Pages with header/footer -> Startup Script:
if (ew.IS_LOGGEDIN)
$('[data-widget="pushmenu"]').PushMenu('expand');
then make sure you have already re-generated ALL the script files, and try again.
Re: Hide Side bar on login page only
Posted: Tue Jun 18, 2024 5:09 am
by DGarza
mobhar wrote:
if (ew.IS_LOGGEDIN)
$('[data-widget="pushmenu"]').PushMenu('expand');
There is a little problem with this, when you open de page on a mobile, the side bar always appear when you regresh de page, you need to add a condition of the screen px or something before