Restricting site access
Hi Everyone,
I'm building a completely closed community, and have most pages redirecting to the Splash page if someone tries to access them when they are not authenticated.
I have this set in Settings.
Some pages still show the nav and some page elements.
Eg: This page redirects to the splash page: https://mydomain.example/page/view-persons-profile?id=32
This page loads the page elements, revealing the profile users name https://mydomain.example/page/persons-profile-info?id=32
Any tips for solving this, or is it a bug?
Thanks
-
-
·
LeonidS
- ·
Hello @Brett Von Holdt !
By default, you may hide every site's menu item for the guests via the Studio->Naviagation->System->Site menu area. Or add the RAW block for each of those pages with the code like:
<script>
$("#bx-menu-toolbar-1-container).remove();
</script>
It will clean the top site menu in the Artificer template.
-
·
LeonidS
-
- · Karina
- ·
Mine is also completely closed. I just went to Navigation and changed visibility for menu items- removing unauthenticated users. Also in pages you have the option of choosing visibility- I removed unauthenticated there too for each page. My way is tedious process but it worked well
-
- · OneEagle
-
·
In reply to LeonidS
- ·
Hello @LeonidS
The code you provided above to hide navigation menu items for the guests on a specific page works but the only problem is that when the page view changes on the computer, when you zoom in the page or when you resize the browser window or when you view the page on the phone (mobile view), it automatically creates the hamburger menu icon and display the menu again. How to prevent it from behaving like that and still hide the the navigation menu even when the page view changes? Thanks
-
-
·
LeonidS
-
·
In reply to OneEagle
- ·
Then try to use this code:
<script> $( document ).ready(function() { $("#bx-menu-toolbar-1-container).remove(); }); </script>
-
·
LeonidS
-
- · OneEagle
-
·
In reply to LeonidS
- ·
Thanks a lot. i've tried it. The code works but it still behaves the same as the previous one. When you resize the page window or zoom in or change the page view to mobile view, the hamburger menu icon displays again and the menu items are back. Any other idea?