Automatically hide the menu proxy if there only one heading?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
rogersm
Propeller Head
Posts: 97
Joined: Fri Nov 07, 2014 4:29 am

Automatically hide the menu proxy if there only one heading?

Post by rogersm »

Hi there,

In our HTML output, we have a menu proxy that is set to display all the headings (h1, h2, h3,..) in the topic you are viewing and this looks fine when there is more than one heading in the topic. However, some topics, only have a heading 1 (see attached screenshot). Is it possible to hide the display of the menu proxy if only one heading (h1) is included in a topic?

thanks,
mark
You do not have the required permissions to view the files attached to this post.
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Automatically hide the menu proxy if there only one head

Post by Psider »

I did a proof of concept ages ago, where I hid the menu proxy if there was only one h1 and no other headings. It only works if you have only one h1 per topic, and don't mind displaying only a single h2, if your topic only has one other heading in it.

I wanted to show h2-h3 in the menu proxy, and not display the menu if there were no h2 or h3. What I did was set the menu proxy to display 2 levels, then I defined h1 in my stylesheet with mc-heading-level: 0, so that it's not a heading for the menu proxy. This resulted in a menu proxy that didn't display if there was only a h1 in the topic, but displayed the h2 and h3 headings in the topic. You set the depth to the heading level minus 1, to account for excluding the h1.

It won't work if you use multiple h1 headings in each topic though, or if you don't want to display a single h2 or h3 heading.

(To the best of my memory, anyway. I don't have Flare anymore to confirm, but looking at the source code, I think that's all I did.)
rogersm
Propeller Head
Posts: 97
Joined: Fri Nov 07, 2014 4:29 am

Re: Automatically hide the menu proxy if there only one head

Post by rogersm »

Great, thanks Psider. Any idea if there are any additional impacts with setting mc-heading-level: 0?
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Automatically hide the menu proxy if there only one head

Post by Psider »

Sorry I can't remember. It was a while ago. Hopefully someone else can answer that part.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Automatically hide the menu proxy if there only one head

Post by ChoccieMuffin »

I suspect it may impact other outputs, such as PDF, so you would need to make sure your different mediums use the right setting for mc_heading-level for each heading to get the desired output.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply