Problem with title-linked TOC entries + conditions

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
FrankyT
Propeller Head
Posts: 56
Joined: Wed Apr 04, 2012 3:45 am
Location: United Kingdom

Problem with title-linked TOC entries + conditions

Post by FrankyT »

I've recently upgraded to Flare 2017 from Flare 10 and am struggling to get a TOC to do what I want in response to different conditional settings for different targets.

In Flare 10, the Table of Contents entries were static: each entry's content was created from its title or first heading when you added it to the TOC. After that, however, it didn't change. If you wanted to change the TOC entry (e.g. because you had changed the title of the associated topic), you had to do so manually. (I ended up writing a script to do it.)

In Flare 2017, by default TOC entries are linked to their topics' titles via the Title="[%=System.LinkedTitle%]" attribute. And provided that the linked topic has a title, all looks well in Flare:
ftoc1.PNG
However, the entry "Configuration" links to a file that has the Print-Only condition set:
ftoc2.PNG
PDF output is fine:
ftoc3.PNG
But with CHM output, the TOC entry no longer links to a topic because the topic's file is "Print Only". I vaguely expected the output to use the blue TOC entry text that I see in Flare, but instead the output has an error message for the unlinked entry:
ftoc4.PNG
Has anybody else had this issue, and if so, what did you do about it? I suspect that I am going to have to simply hard-code the text for the TOC entries that sometimes link to topics and sometimes don't. That's messy, since I then have a mixture of linked and unlinked TOC entries, and will have to remember to update the TOC manually if I ever change the titles of unlinked topics. But I suspect it may be the only option.

Thanks,

Franky
You do not have the required permissions to view the files attached to this post.
cdschroeder
Sr. Propeller Head
Posts: 189
Joined: Mon Feb 22, 2016 9:18 am
Location: Cincinnati, OH

Re: Problem with title-linked TOC entries + conditions

Post by cdschroeder »

Did you try applying conditions to the TOC entry (rather than the topic itself)? Not ideal, but it might be preferable to hard-coding each title.

I haven't upgraded to 2017 yet, so I'll be interested to hear what you find!
Casey

Image
FrankyT
Propeller Head
Posts: 56
Joined: Wed Apr 04, 2012 3:45 am
Location: United Kingdom

Re: Problem with title-linked TOC entries + conditions

Post by FrankyT »

Good suggestion re. making the TOC read-only, but unfortunately it didn't work, as it causes the node to be completely removed from the generated TOC, and along with it any child nodes :( Thanks anyway.
cdschroeder
Sr. Propeller Head
Posts: 189
Joined: Mon Feb 22, 2016 9:18 am
Location: Cincinnati, OH

Re: Problem with title-linked TOC entries + conditions

Post by cdschroeder »

Sorry to hear that - did your previous method (conditioning the topics themselves) not remove whole nodes in v10? How did it handle the sub-items? I guess I've always tagged in the TOC so I am used to that behavior.

Worst case scenario, I suppose you could do something like this:
  • - Closed data sources
    - Configuration (print only)
    • - Troubleshooting Options (print only)
    - Troubleshooting Options (CHM only)
    - Conventions
I use this technique in one location: My web format has a Resources section, and out of that section I want only the Support info page to show up in my PDF. But if someone else has a better workaround, I'm all ears. Anything to prevent unnecessary work. :)
Casey

Image
FrankyT
Propeller Head
Posts: 56
Joined: Wed Apr 04, 2012 3:45 am
Location: United Kingdom

Re: Problem with title-linked TOC entries + conditions

Post by FrankyT »

cdschroeder wrote:Sorry to hear that - did your previous method (conditioning the topics themselves) not remove whole nodes in v10? How did it handle the sub-items? I guess I've always tagged in the TOC so I am used to that behavior.
In Flare 10, conditioning a topic (=file) rather than the TOC entry resulted in the node being unlinked in the non-print medium. But the subnodes were retained, as were their topic links.
Worst case scenario, I suppose you could do something like this:
  • - Closed data sources
    - Configuration (print only)
    • - Troubleshooting Options (print only)
    - Troubleshooting Options (CHM only)
    - Conventions
Yes, I thought about having 2 parallel TOC branches, but I don't like it much because it's harder to maintain.

I do actually want to keep the empty parent TOC entry in the CHM, as a way of grouping subtopics. (In my real TOC, there are several subtopics. The example I gave is a dummy.) I think someone told me it's standard not to have content in any TOC entries other than the "leaf" topics in a CHM; at any rate, that's how this CHM is structured.

For Flare 10 I wrote a tool that went through a TOC, looked up the headings, and updated the TOC entries. Where a topic was unlinked, the existing TOC entry was retained. The tool also resolved variables. So it was fairly painless to use. But now I need to adapt my projects to Flare 2017's default behaviour of linked topic titles. It's true there's nothing stopping me continuing to use my tool, but that defeats the object of Flare's new TOC behaviour.
cdschroeder
Sr. Propeller Head
Posts: 189
Joined: Mon Feb 22, 2016 9:18 am
Location: Cincinnati, OH

Re: Problem with title-linked TOC entries + conditions

Post by cdschroeder »

FrankyT wrote:I think someone told me it's standard not to have content in any TOC entries other than the "leaf" topics in a CHM; at any rate, that's how this CHM is structured.
Interesting. I was not aware of that!

You should probably submit a bug report (if you haven't already): https://www.madcapsoftware.com/feedback/bugs.aspx

Sorry I couldn't help more. :(
Casey

Image
FrankyT
Propeller Head
Posts: 56
Joined: Wed Apr 04, 2012 3:45 am
Location: United Kingdom

Re: Problem with title-linked TOC entries + conditions

Post by FrankyT »

cdschroeder wrote:
FrankyT wrote:I think someone told me it's standard not to have content in any TOC entries other than the "leaf" topics in a CHM; at any rate, that's how this CHM is structured.
Interesting. I was not aware of that!
Don't quote me on that. You certainly can have topics hanging from non-leaf nodes in a CHM. But all the examples I found had only "leaf" content. However, I can't currently find a CHM help file from a third-party application. Mostly help these days opens web help. CHMs are on the way out, but I'm dealing with a legacy product that isn't worth converting to HTML5 help.
You should probably submit a bug report (if you haven't already): https://www.madcapsoftware.com/feedback/bugs.aspx

Sorry I couldn't help more. :(
No need to apologise, glad someone took an interest :)

I will try to find time to submit a bug report.

In the mean time, I have created a Python tool that goes through a TOC, and looks up each linked topic. If the linked topic has conditions in its <html> element, the tool creates a static TOC entry (derived from the first heading in the topic). If the linked topic doesn't have conditions, the tool inserts [%=System.LinkedTitle%] into the Title attribute.
Fiona
Sr. Propeller Head
Posts: 117
Joined: Tue Jan 27, 2015 7:44 am
Location: U.K.

Re: Problem with title-linked TOC entries + conditions

Post by Fiona »

Did you ever find a solution to this? I have hit this issue too...I want to create a ToC for the HTML5 version of my documentation that has an unlinked entry and can't. I tried applying media conditions to the ToC entry and that removes it and its children from the generated HTML5. I was definitely able to do this is earlier versions of Flare (I'm using 2018r2), and those still work correctly, but I can't set up new ones. Any help appreciated! Thanks.
kmorrison
Sr. Propeller Head
Posts: 104
Joined: Mon Nov 11, 2013 3:04 pm
Location: Ottawa, Canada
Contact:

Re: Problem with title-linked TOC entries + conditions

Post by kmorrison »

When I encountered this problem, I decided to include the topic in the web help, even though it's pointless for any purpose besides navigation, and exclude it from the search results.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Problem with title-linked TOC entries + conditions

Post by ChoccieMuffin »

kmorrison wrote:When I encountered this problem, I decided to include the topic in the web help, even though it's pointless for any purpose besides navigation, and exclude it from the search results.
That's actually not a bad idea, because it maintains your breadcrumbs (if you use them). If you open a topic that isn't in the TOC, you don't get any breadcrumbs so your navigation is a bit busted.
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