Expanding Menu

This forum is for all Flare issues not related to any of the other categories.
Post Reply
igt
Jr. Propeller Head
Posts: 3
Joined: Fri Oct 06, 2023 7:43 pm

Expanding Menu

Post by igt »

Has anyone done a collapsible side menu in the top-nav layout?

Sean
jimgilliam
Propeller Head
Posts: 96
Joined: Tue Jun 04, 2013 9:49 am
Location: Arkansas, U.S.A.

Re: Expanding Menu

Post by jimgilliam »

Not sure I understand the question. If you mean collapse the entire menu (as in hide/show the menuproxy)... yes, I have.

If you mean transforming the menuproxy into an accordion-style menu... no. I decided I learn more by trying to create my own accordion menu using the XML TOCs from my projects. And no, I haven't accomplished that either... yet... but I get closer every week when I get a break from work projects.

:flare: Jim
:flare:
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Expanding Menu

Post by NorthEast »

If you mean having both the Top Nav menu (drop down menu) and a Side Nav menu (accordion menu) displayed together, then Flare doesn't allow you to do that.

As jimgilliam mentions, you can use the Top Nav skin and insert a menu proxy, but that inserts a static menu which is not collapsible.
Now, you could use a third-party menu control to reformat that menu proxy into a collapsible menu, but it's not an easy option so you need to be comfortable implementing that yourself. For example, I did a successful experiment with "Smart Menus" several years ago, and there's a discussion here about it: viewtopic.php?t=21607

However, there's another interesting option. Both the Top Nav and Side Nav outputs actually include both menus, but just hide the one that's not being used!

In a Top Nav output, the Side Nav menu is located in <nav class="sidenav-wrapper">, which is set not to display, but you can display it by using something like:

Code: Select all

div.sidenav-layout nav.sidenav-wrapper 
{
    display: block;
}
In a Side Nav output, the Top Nav menu is located in <ul class="navigation">, which is set not to display, but you can display it by using something like:

Code: Select all

div.title-bar-layout div.navigation-wrapper ul.navigation
{
    display: block;
}
Obviously you'd have to add extra CSS and maybe some script to reposition it, and thoroughly test it. But I just thought I'd mention it, as it might be worth further investigation. The downside is that any solution might break if MadCap change their output - which is possible considering it's an undocumented 'feature'. There's also risk if you style a menu proxy too, although I'd say there's less risk in that option.
Post Reply