Hi,
Ver: 2025.3
I am trying to default the sidebar nav menu to closed in the Login screen.
I have added the following in Page_Render (LOGIN)
// Set default for AdminLTE
Global $BODY_CLASS;
$BODY_CLASS .= " sidebar-collapse ";
LOG("**** Collapse sidebar");
and also tried both of the following in “LoginPage Startup Script”
$( 'body' ).addClass( 'sidebar-collapse' );
$( '.pace-running' ).addClass( 'sidebar-collapse' );
Watching via Inspect in the browser the initial result as the page is loaded is
<body class="pace-running sidebar-collapse" style="cursor: default; height: auto;"
but then I watch the body tag get rewritten to
<body class="pace-running" style="cursor: default; height: auto;"
removing the additional classes I added. I haven’t added any code to do that. The final result is the menu is shown.
I have the AdminLTE Layout set to Layout-Fixed in the Advanced Options. Have tried sidebar-collapse as an option here as well just to see if I can get it working. No luck. Haven’t touched anything in the styling at all.
Any ideas would be much appreciated.
TIA
Steve.