Page 1 of 1

How to format a TOC in an online topic - HELP?

Posted: Tue Jun 13, 2017 7:16 am
by chrisburden
I have added a TOC proxy to a topic in an HTML5 project.

The topic builds no problem but all the project topics a listed in a single list.

I want to be able to format the list in the same way I can format the PDF version, for example:

Main topic
sub-topic 1
sub-topic 2

Another topic
Sub-topic 2.1
Sub-topic 2.2


When I apply any styles to p.TOC1 and p.TOC2, etc, the formatting does not get fully used, for example, margin, padding or indentation.

Looking at the code you can see Flare converts TOC entries to single tables per TOC entry.

I have looked into sitemap.xml generation and coverting that to HTML. That works but does not reflect the correct TOC order.

If I changes the CSS settings for p.TOC1, these settings are rolled through to p.TOC2 for the online only.

Does anyone know how to add a automatically generated TOC/sitemap HTML to an HTML5 output?

Chris

Re: How to format a TOC in an online topic - HELP?

Posted: Tue Jun 13, 2017 6:00 pm
by GregStenhouse
I just replied to another similar post. You should be able to control you TOC styles using
td.GenTOCText1
td.GenTOCText2
td.GenTOCText3

Re: How to format a TOC in an online topic - HELP?

Posted: Wed Jun 14, 2017 1:17 am
by chrisburden
Thanks Greg,

You had my hopes up but it did not work :cry:

Adding these selectors to my project CSS has no impact on the output. I tried all different media types in CSS.
I also tried a.GenTOCText1, etc but nothing.

This class is part of the "Topic.css" files which lives in the Default folder of the skins folder. This CSS is built dynamically when the project is compiled. It contains all the 'magic' stuff that MadCap builds into your output to make it work.

I did try editing the Topic.css post building the output and that made some changes. The next big problem is that ALL TOC entry tables, table cells, and links all have the class "GenTOCText1". Even topics that are sub-topics have this class. That means any styles I do add to the Topic.css post-build will all have the same formatting.

What I need is for MadCap to build the TOC proxy correctly and recognise the p.TOC1, p.TOC2, etc styles from my main CSS for online output and not create these funky tables.

Older webhelp uses DIVs, maybe that is something MadCap should look into?

Please let me know if I am missing something obvious?

Chris

Re: How to format a TOC in an online topic - HELP?

Posted: Wed Jun 14, 2017 1:59 am
by NorthEast
The TOC proxy is really intended for print targets.

For help targets, I'd suggest inserting a Menu proxy. This can be styled using a menu component skin.

Re: How to format a TOC in an online topic - HELP?

Posted: Mon Jun 19, 2017 8:24 am
by chrisburden
Yes so I have found out the TOC Proxy is for Print only.

You can use the TOC proxy and it mostly works, be it without any indentation support. Only the p.TOC1 format works for the online output.

Madcap support team have confirmed that there is now a feature request for having a TOC type proxy that builds a sitemap in HTML with indentation.

Originally they suggested using a miniTOC but that only works relative to the topic it is inserted into.

I was able to format the links in the TOC Proxy by adding:

a.GenTOCText1:link
{
color: #000000;
}

a.GenTOCText1:hover
{
background-color: #bababa;
color: #ffffff;
padding: 5px;
}

a.GenTOCText1:visited
{
color: #000000;
}

I have made many BUG and feature requests any none have been fixed or implemented so not holding out much hope for this one either..... but maybe this time?

Re: How to format a TOC in an online topic - HELP?

Posted: Mon Jun 19, 2017 11:39 pm
by NorthEast
chrisburden wrote:Madcap support team have confirmed that there is now a feature request for having a TOC type proxy that builds a sitemap in HTML with indentation.
Really? I'm a bit surprised MadCap support didn't suggest using a menu proxy, because a menu proxy can already do that (in Flare v11 and later).

I use a menu proxy for the sitemap on our sites.

When you insert the menu proxy, just switch off the context sensitive option, and set it to show all levels (or however many levels you want).