Hide top, bottom and left navigation menus and bars

HelloI have a generated list that I need to show to all users of my appwhen that page shows to anonymus users, I want it to show without any navigation bar, just the list, no left bar, no top bar, no bottom barI thought I could use

$(“.ewMenuRow”).remove();
$(“.ewMenuColumn”).remove();but nothing happensplease help :slight_smile:

From PHPMaker 2019 onwards, css class names are changed to “ew-xxx”. You can check the correct class names by right-click on the page element in the browser and click “Inspect”. Read https://discourse.hkvstore.com/t/migrating-to-v2022/655/1

That should be:$(“.ew-menu-row”).remove();
$(“.ew-menu-column”).remove();

mobhar wrote:
That should be:$(“.ew-menu-row”).remove();
$(“.ew-menu-column”).remove();Thank you, the actual class names for the sidebar and the top bar are$(“.main-header”).remove();
$(“.main-sidebar”).remove();And works fineso… here is the big issueI want to remove main header and main sidebar to everyone seeing my page and not logged in. Problem is that I cant do this on client scripts. Any other way to hide both header and sidebar from server events?thanks for the help

You may try to use the global variable $SkipHeaderFooter and set it to true in server event such as Page_Load. (v2020)

powerjoshe wrote:
mobhar wrote:
That should be:$(“.ew-menu-row”).remove();
$(“.ew-menu-column”).remove();Thank you, the actual class names for the sidebar and the top bar are$(“.main-header”).remove();
$(“.main-sidebar”).remove();And works fineso… here is the big issueI want to remove main header and main sidebar to everyone seeing my page and not
logged in. Problem is that I cant do this on client scripts. Any other way to hide
both header and sidebar from server events?thanks for the helpTry, go to client_scripts->Global->pages with header/footer->startup_script<?php if (IsLoggedIn()) { ?>
$(“.ew-menu-row”).show();
$(“.ew-menu-column”).show();

<?php }else { ?>

$(“.ew-menu-row”).remove();
$(“.ew-menu-column”).remove();

<?php } ?>

Thank you sir, that worked, with a slight mod<?php if (IsLoggedIn()) { ?>
$(“.main-header”).show();
$(“.main-sidebar”).show();

<?php }else { ?>

$(“.main-header”).remove();
$(“.main-sidebar”).remove();

<?php } ?>problem is that, even though, sidebar is removed, I still have that blank space as if the sidebar were still thereany ideas on how to collapse that space?Niijimasama wrote:

powerjoshe wrote:
mobhar wrote:
That should be:$(“.ew-menu-row”).remove();
$(“.ew-menu-column”).remove();Thank you, the actual class names for the sidebar and the top bar are$(“.main-header”).remove();
$(“.main-sidebar”).remove();And works fineso… here is the big issueI want to remove main header and main sidebar to everyone seeing my page and not
logged in. Problem is that I cant do this on client scripts. Any other way to
hide
both header and sidebar from server events?thanks for the helpTry, go to client_scripts->Global->pages with header/footer->startup_script<?php if (IsLoggedIn()) { ?>
$(“.ew-menu-row”).show();
$(“.ew-menu-column”).show();

<?php }else { ?>

$(“.ew-menu-row”).remove();
$(“.ew-menu-column”).remove();

<?php } ?>