Accordion Menu in MadCap Flare – Part Seven

This is Part 7 of a series of posts on how to create the following layout, complete with accordion menu and slide-in drill-down menu, in MadCap Flare.

Flare with Accordion Menu

If you missed the previous parts, here are links:

In this part, I want to look at the fix that was released in Flare 2017 R3.

The Problem with the Accordion Menu in Flare 2017 R1 and R2

For Flare 2017, MadCap changed the way that the table of contents was handled. This caused a problem with the accordion menu solution I’ve documented in this series – it just doesn’t work.

There was no easy solution for 2017 R1 and R2, although I did make some progress with a skinless output and using a snippet with a UL list as the table of contents. Not ideal though, as it made it a lot more work to manage the contents.

The Solution for the Accordion Menu in Flare 2017 R3

I asked MadCap about a fix on LinkedIn and they responded quickly – just a few weeks later, we have the fix. I’ve not tried it yet, but this is what they told me:

“All you need to do for the project is to wrap the code in Content/Resources/Scripts/foundation-menu-off-canvas-initialisation.js with the code listed below then build and view.”

Here’s the code they provided:

$(".menu").on("loaded", function () { 

Obviously, replace [YOUR CUSTOM JAVASCRIPT] with the actual javascript code described earlier in this series. In Flare 2017 R3, that should be all that’s needed.

When I get time, I’ll try it out and see how it works. If you need it right now, give it a try and let me know how you get on.

Dave Lee spotted an issue with the script running multiple times, due to the .menu being in both the accordion menu and the mobile menu, so he provided this update:

$(document).ready(function(){ $("").on("loaded", function () {  

       /* put your code here */

}); });

About Craig

Freelance Technical Author Craig Wright

I am a freelance technical writer and I can help your business to deliver documentation that helps your customers and reduces your support costs.

How Can I Help You?

If you need help with your documentation, please get in touch. I provide a range of technical writing services and can make sure you deliver content that meets your customers' needs.


No Comments

More from the StrayGoat blog

See all posts