Using the Advanced Sidebar Pages Menu widget, I have it configured to only show the current section content. It seems that the code that governs the rules for what sidebar content gets displayed and what doesn’t get displayed has a slight delay in being processed, such that the full sidebar content appears briefly before the display parameters are applied.
Hidden menu flashes before being hidden
Resolved
OnPoint Plugins
Hi Jared,
Based in the clip you sent, there is something going on which is not intended. This plugin is not designed to show an entire menu then hide it on the front end. Any exclusion of menus or menu items happens on the backend before the page loads. The only exception is accordion menus which use JavaScript on the front end to open and close sections.
Please send me a link to where I can see this in action and I’ll work on tracking this anomaly down.
Jared Ranum
Thank you for the reply. The information about the front-end JS loading for the accordion was actually very helpful for diagnosing the issue.
In this implementation, I want the sidebar menu to begin displaying at the second level from the site root domain, instead of the first level. For example, with a URL of http://domain.com/level-1/level-2/, I want the sidebar to only show from level-2 down. In order to achieve this, I initially targeted the Level 1 li with the “closed” class and applied a CSS rule to hide it. I think the split second delay in the JS being applied to the menu to add the “closed” class was causing those Level 1 menu items to appear briefly before being hidden by the CSS rule.
Given the split-second delay in the JS loading and applying the appropriate classes for the accordion function, I reversed my approach and have implemented a CSS rule to hide all Level 1 li elements in the accordion and then apply a second CSS rule to reset the display parameter for the li with the “open” class. This results in a much nicer result, albeit with the same minor delay as the JS classes are applied on the front-end.
So, I think this is resolved on my end. If anything, I guess I would throw out a feature suggestion of being able to configure the widget so that the starting point for creating the menu can be custom set instead of always having to begin from the site root domain, if that makes sense.
OnPoint Plugins
Hi Jared,
It sounds like you may want to uncheck “Display highest level parent page” which will allow the menu to start displaying from the child items (level 2) down. This option if not available on the Navigation Menu, so if you’re using the a Navigation menu, your approach is solid.
Have a great day!