Flare Menu Proxy - Excluding Headings

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
James M
Jr. Propeller Head
Posts: 2
Joined: Thu May 26, 2022 9:23 am

Flare Menu Proxy - Excluding Headings

Post by James M »

Hi,

I'm trying to use the Flare menu proxy in the Headings mode and was wondering if it is possible to exclude certain headings or if there are other customization options available for the menu proxy?

In the attached image you can see how the h1 Physical Light and the H2 Table of Contents at the very top being included in the menu is redundant so I was hoping to learn more about some additional customization that could make this mode more flexible. Of course I could just use local formatting for the table of contents and page name instead of a header tag but that doesn't feel like an ideal solution.

Thanks
James
You do not have the required permissions to view the files attached to this post.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Flare Menu Proxy - Excluding Headings

Post by ChoccieMuffin »

I suggest you add a generic style, for example ".NotInTOC" with the attribute "mc-heading-level: 0;" and apply that generic style to the headings in the Physical Light and Table of Contents topics.
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
James M
Jr. Propeller Head
Posts: 2
Joined: Thu May 26, 2022 9:23 am

Re: Flare Menu Proxy - Excluding Headings

Post by James M »

Hey thanks for your suggestion, does that mean there's no other way to exclude things? It seems a bit brute force considering those headers could be useful and appropriate in other circumstances.
paperfax
Jr. Propeller Head
Posts: 1
Joined: Thu May 19, 2022 1:18 pm

Re: Flare Menu Proxy - Excluding Headings

Post by paperfax »

The "mc-heading-level: 0;" solution is what I used. This ends up having an impact on other tags that need to identify the h1 of a topic though, for example "Madcap:xref". Since h1 is set to 0 and is "invisible", in a way, it uses the first h2 in the topic instead of the title as the link text.
hattie
Jr. Propeller Head
Posts: 6
Joined: Thu Oct 29, 2015 3:28 am

Re: Flare Menu Proxy - Excluding Headings

Post by hattie »

I have the same problem. I want to use the menu proxy, but only want it to show heading level 5 and 6, not the topic title/heading 1 etc. or any other heading for that matter.
There must be a way to do this :-)
Anybody?
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Flare Menu Proxy - Excluding Headings

Post by NorthEast »

hattie wrote:I have the same problem. I want to use the menu proxy, but only want it to show heading level 5 and 6, not the topic title/heading 1 etc. or any other heading for that matter.
There must be a way to do this :-)
Anybody?
Flare only allows you to select the headings to include from level 1 down, so there's no setting to omit particular levels.

The only way I can think of doing this is to use CSS to hide the levels that you don't want.
Try adding this to your stylesheet:

Code: Select all

ul.menu[data-magellan] > li,
ul.menu[data-magellan] > ul > li,
ul.menu[data-magellan] > ul > ul > li,
ul.menu[data-magellan] > ul > ul > ul > li
{
    display: none;
}
That should work, although the highlighting as you scroll may behave a bit oddly.

That CSS looks for the menu proxy in the output and hides the list items on the first 4 levels, leaving levels 5 and 6 visible.
To break that down a bit:
* ul.menu[data-magellan] - This is the list (ul) with the class "menu" and a "data-magellan" attribute (which is only used when the menu proxy is set to show headings)
* > li - list item on level 1
* > ul > ul > ul > li - list item on level 4
Post Reply