[SOLVED] one single miniToc for all empty topics?

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

[SOLVED] one single miniToc for all empty topics?

Post by gbusch »

Hello there.

I just wonder if it is possible to create a "dynamic" Topic with a mini-TOC that only shows up for certain TOC entries.

I manage an old (and huge) CHM file that has grown over the last 10 years using MadCap Flare 9.1 (recently switched from HTML Help Workshop). In that CHM file there are many empty entries at the first level (those "book" iconed ones) that just serve as a "wrapper" for "sub-topics" so those "book-entries" itself have no relevant content.

In the past these topics where linked to an empty dummy file. So selecting those entries just show an empty page. Because i don't like those empty pages I'd like to change this to show up at least a (possibly auto-generated) short overview of what is contained in this chapter (instead of an empty page). The solution seems to be mini-TOC proxies.

I created a dummy topic that contains a mini-TOC proxy with a depth set to 1 level. But obvously i cannot just link all empty entries to the same dummy topic with that proxy, because for every empty topic this would always only show the very last mini-TOC of the whole CHM file. (might be by design of MadCap Flares way how proxies are generated)

So for each empty TOC-entry i would need to create a new topic that contains only a mini-TOC proxy and link it to the TOC entry. This seems to be a very redundant task to me.

Is there any way to create some kind of one dynamic topic with a mini-TOC that is recreated every time it is used so i don't have to create 100 or more identical topics?

And is there any way to keep the title of the TOC entry in the CHM as it was entered in the TOC of MadCap Flare instead of using the heading inside the topic?

many thanks in advance
gb
Last edited by gbusch on Wed May 14, 2014 3:56 am, edited 1 time in total.
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: mini-Toc for empty topics only

Post by Lydia »

Hi gb,
I can't think of an option to make a generic topic for the mini-toc that would show the actual table of contents of the book. Maybe there are options, if you know how to program this.
In TOCs it's often seen that the books won't link (or open) anything. Clicking the book opens the topic list below it in the TOC, but not content on the right side. That can be achieved by removing the link to the empty topic. I think it's a common approach. The question is whether you like it. Maybe at least it is nicer than opening an empty page?

Kind Regards, Lydia.
Using Flare 10.2 and Flare 11 on Win 7
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: mini-Toc for empty topics only

Post by NorthEast »

The short answer is no - you can't have have multiple TOC links to the same topic, and have a working miniTOC.

The miniTOC in a topic is compiled at build-time, it is not dynamically generated at run-time; so this means a single topic can't be in several locations in the TOC, and have several different miniTOCs. (The same applies for breadcrumbs.)

Creating multiple topics is the only way to handle this at present. I'd suggest linking them to a separate master page, which contains the miniTOC and all other content that's required; then at least if you want to change anything, you only need to change the master page and don't need to edit any of the topics themselves.
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

Re: mini-Toc for empty topics only

Post by gbusch »

Thanks for your answers.

@Lydia:
Though removing the link of empty topics in the TOC solves the problem with empty pages a new issue occurs :(
Problem is i have a breadcrumbs-proxy inside my MasterPage.
The breadcrumbs won't work if the empty parent topic is not linked to an existing topic.

So it seems i have to create loads of "dummy topics" if i want to have both: breadcrumbs and non-empty pages.
Not very nifty but if that's the way i'll have to take it.

@Dave:
Thanks for the hint with multiple masterpages.

Anyway would this be worth to file a feature-request to add an option to flare that auto-creates empty topics for TOC entries that are not linked to a topic when the output is build?

gb
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: mini-Toc for empty topics only

Post by Lydia »

Just thinking if there is a fix for the breadcrumbs that won't work. To clarify: are these the breadcrumbs to the topics inside the book, that don't work? (They should, I think.) The unlinked book does not show any breadcrumbs - nothing (new) will be shown in the content on the right side. If there was an open topic that will stay open.
So if we are talking about the breadcrumbs path to a topic inside the book - that should not be broken I think by unlinking the book itself. If it does, maybe it can be fixed.
Using Flare 10.2 and Flare 11 on Win 7
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

Re: mini-Toc for empty topics only

Post by gbusch »

To clarify: are these the breadcrumbs to the topics inside the book, that don't work?
Yes.
They are under the book.
(The book itself dosen't display anything if not linked)

See screenshots:
breadcrumbs.png
The selected Topic is "Stammdaten -> Personal -> Sozialversicherung -> Unterbrechung -> EEL Unterbrechung Krankengeld".
So i'm at the 5th level. But the Breadcumbs at the top of the topic only show the title of the parent topic at the root level ("Stammdaten") wich is an empty TOC entry that is not linked to anywhere (as you suggested).

I expected to see breadbrumbs where where each parent element is a selectable link. But there seems to be a problem if a parent TOC is not linked to a topic. In this case Flare cannot create a link for that TOC entry in the breadcrumbs and this might be the reason why all following child links will fail. (no topic to link to? -> break ...)

If i link the parent topic to an empty dummy topic, the breadcrumbs work as expected:
breadcrumbs_2.png
If child-topics alos are not linked, the breadcrumbs in the child-child-topics shows links only until the first unlinked parent-topic:
(selected entry is "Stammdaten -> Firma / Betriebsstätte -> Betriebsstätte -> Meldungen")
breadcrumbs_3.png
The root-level TOC entry "Stammdaten" is linked to a topic.
The child-TOC entry "Firma / Betriebsstätte" is not linked.
"Betriebsstätte" is linked to a topic.
But the breadcrumbs stops at "Firma / Betriebsstätte".

Stylesheet is:

Code: Select all

MadCap|breadcrumbsProxy
{
	mc-breadcrumbs-prefix: '';
	mc-breadcrumbs-count: 10;
}
You think it is an error?
You do not have the required permissions to view the files attached to this post.
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: mini-Toc for empty topics only

Post by NorthEast »

It should work, the unlinked books in the TOC should not break the breadcrumb trail.

I have noticed some strange behaviour with breadcrumbs before though, where it seems to 'forget' the mc-breadcrumbs-count and uses the default setting of showing 3 books (+1 topic). I would try Build > Clean Project (or just delete the Output folder), and build the help again.
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: mini-Toc for empty topics only

Post by Lydia »

I agree with Dave, I would expect this to work.
gb, if you have a maintenance contract, I would contact MadCap support and show them a sample of the broken breadcrumbs.
Using Flare 10.2 and Flare 11 on Win 7
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

Re: mini-Toc for empty topics only

Post by gbusch »

@Dave:
I deleted the output folder: No luck.
As soon as a TOC entry is not linked the breadcrumbs are getting worse.
(notice: i inserted the breadcrumbs inside the master page - not inside the topic itself. would this make any difference?)

Breadcrumbs won't work for all child entries of the unlinked TOC entry - wich means it displays only the title of the unlinked parent.
As soon as there is another unlinked child entry under the unlinked parent, the breadcrumbs only show the titles of the two unlinked parent entrys for each child entry.

Even more worse: A single linked topic (with no child entrys) after an unlinked book (not under that book) shows the breadcrumbs of the next two unlinked books :shock:

Code: Select all

[-] Topic 1                    (linked; breadcrumbs show "Topic 1")
    [-] Topic 1.1              (linked; breadcrumbs show "Topic 1 -> Topic 1.1")
        [-] Topic 1.1.1        (linked; breadcrumbs show "Topic 1 -> Topic 1.1 -> Topic 1.1.1")
            [+] Topic 1.1.1.1  (linked; breadcrumbs show "Topic 1 -> Topic 1.1 -> Topic 1.1.1 -> Topic 1.1.1.1")

    [-] Topic 1.2              (unlinked)
        [-] Topic 1.2.1        (linked; breadcrumbs show "Topic 1 -> Topic 1.2")
            -   Topic 1.2.1.1  (linked; breadcrumbs still show "Topic 1 -> Topic 1.2")

    -   Topic 1.3              (linked; no child entrys; breadcrumb show "Topic 1.4 -> Topic 1.4.1")
    [-] Topic 1.4              (unlinked)
        [+] Topic 1.4.1        (unlinked)
@Lydia: Unfortunately we don't have a maintenance contract :(

Anyway at least my question about "only one topic for a miniToc for all unlinked TOC entries vs. an individual topic for each unlinked TOC entry" is solved for me. If this also fixes my breadcrumbs issue i can live with that. (or i have to drop the breadcrumbs - is not mandatory)

Since i imported the topics from an old CHM file it might be an issue related to the general structure/settings of my project files. I will do some more investigation and create a project from scratch to see if this behaviour persists.
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

Re: mini-Toc for empty topics only

Post by gbusch »

Well, i could not reproduce any of the breadcrumbs issues with a clean new project.
The odd behaviour of showing the next entrys in the breadcrumbs i could not track down.
(It still persists in my imported project but not in a new one)

And the other issue was related to my stylesheets.
Parts of the breadcrumbs where set to display "none" ... :roll:
gbusch
Propeller Head
Posts: 44
Joined: Wed Mar 26, 2014 8:52 am
Location: Germany

Re: mini-Toc for empty topics only

Post by gbusch »

The odd behaviour of showing the next entrys in the breadcrumbs i could not track down.
Just some update: I was able to reproduce this even with a new project.
This only happens if you (accidently?) use the same topic multiple times.
In this case the breadcrumbs will show the path to the last topic.
(Seems to be the same thing like in my very first aproach where i tried to use the same topic with a miniToc for all unlinked TOC entries: The last one wins the match)
Post Reply