FlexMenu question/issue

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
5/6/2014 1:12:05 PM
Gravatar
Total Posts 1188
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

FlexMenu question/issue

Hi guys, I'm working on an HTML5 mojo skin based on the latest Foundation framework (5.2.2), and trying to get their JavaScript Top Bar to render a mojoPortal SiteMenu using FlexMenu. The great thing about the Foundation Top Bar is that it's the first responsive, fully collapsible "hamburger" style menu I've seen that supports arbitrary levels of nesting. Perfect for mojoPortal use!

I have it most of the way there, but I've encountered an issue with the ParentLiCssClass property. For this particular menu, the CSS Class for li with child pages needs to be "has-dropdown". The problem I have is that the "has-dropdown" class is being applied to all of the li elements that have child pages, even if none of the child pages are going to be rendered (because their settings are not marked "include in menu", and perhaps other reasons [hide, security, etc.]).

My initial thought is that this could be a bug in the FlexMenu implementation, unless there's something I'm missing?

Thanks,

Jamie

 

5/6/2014 2:25:09 PM
Gravatar
Total Posts 18444

Re: FlexMenu question/issue

Hi Jamie,

First time I've heard of "hamburger" style menu, I'd be curious to see what that is when you have it finished.

I suspect you are right that it is a bug in FlexMenu. Since you are working with the source code can you try modifying line 455 of FlexMenu.cs?

change it from this:

if ((parentLiCssClass.Length > 0) && (mojoNode.ChildNodes.Count > 0))

to this:

if ((parentLiCssClass.Length > 0) && (mojoNode.HasVisibleChildren()))

and I suspect it will fix the problem. I'll make the same change here but let me know if that does fix it.

Thanks,

Joe

5/6/2014 3:37:57 PM
Gravatar
Total Posts 1188
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: FlexMenu question/issue

Thanks Joe, that did the trick!

"Hamburger" is what I've seen people calling the little three line menu indicator that's shown when you collapse a responsive menu down to mobile size, and it becomes too small to display any top level links. Take a look at the foundation.zurb.com home page, and narrow the browser down until it gets to mobile size to see their TopBar menu in action.

I'll definitely be sending this skin over to you once I can get all the basics working. I haven't seen much chatter about the mojoPortal HTML5 initiative lately, but I really believe that responsive, mobile-first designs are the future, since more and more people are browsing on phones, phablets, and small tablets.

Jamie

You must sign in to post in the forums. This thread is closed to new posts.