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
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
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
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 } ?>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();