Hide Side bar on login page only

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
andyrav
User
Posts: 650

Hide Side bar on login page only

Post 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


arbei
User
Posts: 9506

Post by arbei »

You better add the 'sidebar-collapse' CSS class to body tag instead.


andyrav
User
Posts: 650

Post 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


arbei
User
Posts: 9506

Post by arbei »

You may search "sidebar-collapse" in this forum.


andyrav
User
Posts: 650

Post 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


SOHIB
User
Posts: 99

Post by SOHIB »

simply you can tick no heard/footer while generating in front of login.php


onoboa
User
Posts: 94
Location: Guayaquil - Ecuador

Post 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


onoboa
User
Posts: 94
Location: Guayaquil - Ecuador

Post by onoboa »

to restore to default in another pages.

Client Script -> Global -> Pages with header/footer

$('[data-widget="pushmenu"]').PushMenu('expand');

andyrav
User
Posts: 650

Post 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


mobhar
User
Posts: 11790

Post 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.


Post Reply