How to hide the left menu
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Maybe you can add following class to layout-menu div inside menu.xhtml
Also need to do the same for #menu-button at topbar.
Code: Select all
<div class="layout-menu #{!user.loggedIn ? 'layout-menu-static-inactive': ''}"
Thanks for the clue. I actually had to put the menu part on in the template here:
<div class="layout-wrapper #{guestPreferences.menuLayout} #{guestPreferences.orientationRTL ? 'layout-rtl' : null} #{!sessionBean.loggedIn ? 'layout-menu-static-inactive': ''}">
I got the top bar button to rotate with this:
<a id="menu-button" href="#" class="#{!sessionBean.loggedIn ? 'menu-button-rotate':''}">
However, with that said, you can still press the "menu" button when not logged in and get the side menu to toggle out. Is there a way to rotate and disable that button?
NOTE: sessionBean.loggedIn is how I can tell if the user is logged in or not.
<div class="layout-wrapper #{guestPreferences.menuLayout} #{guestPreferences.orientationRTL ? 'layout-rtl' : null} #{!sessionBean.loggedIn ? 'layout-menu-static-inactive': ''}">
I got the top bar button to rotate with this:
<a id="menu-button" href="#" class="#{!sessionBean.loggedIn ? 'menu-button-rotate':''}">
However, with that said, you can still press the "menu" button when not logged in and get the side menu to toggle out. Is there a way to rotate and disable that button?
NOTE: sessionBean.loggedIn is how I can tell if the user is logged in or not.
Last edited by bmoon on 20 Feb 2017, 21:02, edited 1 time in total.
OK, i figured out that the menu button is "disabled" if the menu is not rendered. I just added this to the menu.xhtml file:
<pu:menu widgetVar="me" rendered="#{sessionBean.loggedIn}">
With that and the other two class modifiers, the menu is now hidden, the button is rotated and is disabled --> when I log in (sessionBean.loggedIn is true), then the button rotates, the is enabled and the menu slides out
<pu:menu widgetVar="me" rendered="#{sessionBean.loggedIn}">
With that and the other two class modifiers, the menu is now hidden, the button is rotated and is disabled --> when I log in (sessionBean.loggedIn is true), then the button rotates, the is enabled and the menu slides out
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Glad to hear, thanks for the update! Is it resolved?
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 11 guests