Generating a list of headings in a single topic

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets

Generating a list of headings in a single topic

Postby rjplano on Fri Oct 16, 2020 9:50 am

I have a large project with many long topics. These long topics each contain up to a dozen or more h3 headings. I would like a list of links (cross references) to the h3 headings within a single topic at the top of the topic that contains those headings. Is there a way to do that automatically?

Mini-TOC doesn't work because that looks at the actual TOC, List-of Proxy would find all the h3's in the entire output, after that I'm out of ideas other than manual entry.

Thanks.
rjplano
Propeller Head
 
Posts: 41
Joined: Tue May 05, 2020 10:08 am

Re: Generating a list of headings in a single topic

Postby rjplano on Fri Oct 16, 2020 10:02 am

OP here.

I see now this question was asked ten years ago and a javascript answer was provided by a forum member. https://forums.madcapsoftware.com/viewtopic.php?t=11199&p=63842. Our friend Nita suggested at the time to submit a feature request as many people are looking for that capability. I guess MadCap determined this request was not worth addressing. :( Either that or they've hidden the solution quite well.
rjplano
Propeller Head
 
Posts: 41
Joined: Tue May 05, 2020 10:08 am

Re: Generating a list of headings in a single topic

Postby Nita Beck on Fri Oct 16, 2020 10:29 am

The forum post you linked to is 10 years old, and MadCap has since added the functionality you seek to Flare.

Use a menu proxy and associate the proxy with "Headings" rather than a TOC file.

For more info, https://help.madcapsoftware.com/flare2020r2/Content/Flare/Proxies/Menus/Creating-Topic-Menu.htm.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3463
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Generating a list of headings in a single topic

Postby rjplano on Fri Oct 16, 2020 1:10 pm

Thanks, Nita! I was not familiar with the Menu Proxy before you pointed it out.

I did note in my follow-up post that the post I saw was ten years old. After more searching I didn't find a solution other than the javascript implementation provided by a user, so I assumed it had it not been addressed by MadCap. I'm certainly glad to see that it has been.
rjplano
Propeller Head
 
Posts: 41
Joined: Tue May 05, 2020 10:08 am

Re: Generating a list of headings in a single topic

Postby rjplano on Fri Oct 16, 2020 1:39 pm

The menu proxy is only listing the h1 and h2 headings, even though the Levels to Show is set to (all). I need the h3 headings to be listed. Any hints? Is there a way to show only the h3 heading text?

Thanks again.
rjplano
Propeller Head
 
Posts: 41
Joined: Tue May 05, 2020 10:08 am

Re: Generating a list of headings in a single topic

Postby Psider on Sun Oct 18, 2020 7:16 pm

Maybe check that the H3 doesn't have mc-heading-level set to 0 (zero) in your stylesheet?
Psider
Propellus Maximus
 
Posts: 709
Joined: Wed Jul 06, 2011 1:32 am

Re: Generating a list of headings in a single topic

Postby rjplano on Mon Oct 19, 2020 10:47 am

Psider wrote:Maybe check that the H3 doesn't have mc-heading-level set to 0 (zero) in your stylesheet?


That was it! Nice catch Psider.

Thanks.
rjplano
Propeller Head
 
Posts: 41
Joined: Tue May 05, 2020 10:08 am

Re: Generating a list of headings in a single topic

Postby Rona Kwestel on Wed Sep 15, 2021 2:28 pm

Call me crazy, but when I use the menu proxy with the Headings option, I want the list to start at the h2 level. I certainly don't need a clickable link to the h1 heading that functions as the title of the page. This feature is so easy to use in Confluence and works just as you would expect; why can't we have it the same way in Flare? And yes, I'm going to submit a feature improvement request.
Rona Kwestel
Sr. Propeller Head
 
Posts: 210
Joined: Wed Apr 04, 2007 11:50 am

Re: Generating a list of headings in a single topic

Postby Psider on Wed Sep 15, 2021 5:10 pm

I think I figured out how to do that. I think I set the H1 to mc-heading-level: 0 in my stylesheet. This may cause problems if you need print output though; it's not something I've tested thoroughly.
Psider
Propellus Maximus
 
Posts: 709
Joined: Wed Jul 06, 2011 1:32 am

Re: Generating a list of headings in a single topic

Postby robdocsmith on Wed Sep 15, 2021 6:02 pm

I wonder if like other Proxies there are associated styles like p.MenuProxy1 thru 6? If so you could set p.MenuProxy1 to display:none;
Just a thought and I've not tested it, then it wouldn't affect the other TOCs in your project. But that would also assume that your menu proxy was always at the same level, just under a H1...

Rob
robdocsmith
Sr. Propeller Head
 
Posts: 155
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Generating a list of headings in a single topic

Postby Rona Kwestel on Wed Sep 15, 2021 6:30 pm

Thanks, psider. I just tried it, but then you need to set another style to turn off the bolding of the "selected" class assigned to the first entry in the list.

Code: Select all
h1 {
    mc-heading-level: 0;
}

ul.menu._Skins_Menu.mc-component li > a.selected,
ul.menu._Skins_Menu.mc-component li > a.selected:hover {
    font-weight: inherit;
}


And this would impact print settings, though I imagine you can fix it by setting this in the @media print section:

Code: Select all
@media print {
    h1 {
        mc-heading-level: 1;
    }
}


Rob, I had tried playing with the display property for the same selector as the unbolded one above and that did work:

Code: Select all
ul.menu._Skins_Menu.mc-component li > a.selected {
    display: none;
}


But then you end up with weird list spacing/indentation because the remaining list is still "nested", and heaven help you if you want to add any bullets to the list - it was a bit of a mess.

Bottom line, this should be an easy feature to use without having to jump through arcane hoops to force it to do what it should do in the first place.
Rona Kwestel
Sr. Propeller Head
 
Posts: 210
Joined: Wed Apr 04, 2007 11:50 am


Return to Web-based Outputs

Who is online

Users browsing this forum: No registered users and 10 guests