Hide menu by default

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
VN001
Posts: 5
Joined: 04 Oct 2017, 09:10

17 Oct 2017, 15:05

Hi!

I want the Omega menu to be hidden by default. Right now it always shows, and I have to hide it by simulating a click on the menu button.

Is there any way to hide it by default?

Thank you very much.


Best regards,

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

18 Oct 2017, 12:21

Please add "sidebar-inactive-l" class to div.wrapper;

in template.xhtml

Code: Select all

<h:body ...>
   <div class="wrapper sidebar-inactive-l">
   ...
  
</h:body>

VN001
Posts: 5
Joined: 04 Oct 2017, 09:10

19 Oct 2017, 15:13

Hello, thanks for answering!

The behaviour still being the same as when I simulate a click. I see the menu fade out faster.

Is there any way to solve this issue when you load the page?

Thanks in advance.


Best regards,

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

23 Oct 2017, 14:00

I don't understand this issue. Which situation do you want to open Menu? Could you please attach a sample code? If you don't want to use menu, you can remove it in template.xhtml.

When the page is loaded, if you want to hide menu, please use "sidebar-inactive-l" class;

Code: Select all

<div class="wrapper sidebar-inactive-l">
OR

Code: Select all

$(window).load(function() {
   var wrapper = $('.wrapper');
   if(wrapper) {
      wrapper.addClass('sidebar-inactive-l');
   }
});

VN001
Posts: 5
Joined: 04 Oct 2017, 09:10

24 Oct 2017, 17:33

Hi again,

Let me try to explain the situation we have and the situation we would like to have,

What we have is:

The side menu is always opened and we have included "sidebar-inactive-l" so the behaviour, as you said is the following: the app shows the menu, but the side menu collapse fast.

What we would like to have is:

The side menu is closed, when we navigate to a different view in the application, ideally we would like to keep the side menu closed. Appear and fast close is not an option for our users.

Is that possible?

Thanks you.

Post Reply

Return to “Omega - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests