Condition tags not working in TOC

This forum is for Single-Sourcing your Flare content to multiple outputs.

Condition tags not working in TOC

Postby SharcSL on Tue Nov 27, 2012 3:05 pm

Hello,
We've applied condition tags to topic titles. For example, in the topic title, View a Cat Dog, the conditions are applied to cat and dog. Cat should appear for the Cat.htm file Dog should appear in the Dog.htm file.
In the table of contents for either file, the topic title appears as View a Cat Dog.
I was expecting the topic title to be either View a Cat or View a Dog as appropriate.

What can I do to get the correct topic title to appear in the respective TOCs?

Thank you.
SharcSL
Propeller Head
 
Posts: 27
Joined: Thu Oct 04, 2012 2:26 pm

Re: Condition tags not working in TOC

Postby Nita Beck on Tue Nov 27, 2012 5:13 pm

But you haven't conditioned anything in the TOC itself, so there's nothing for Flare to do. When building Help output, Flare doesn't replace a TOC entry with whatever is the heading in the linked topic.

I'm a little unclear about just what you've got in your project, given that you mention having a Cat.htm and a Dog.htm. Are those source files or output files?

I'll make some guesses.

Let's say you have a source file called Viewing_a_Cat_Dog.htm in whose heading "Viewing a Cat Dog" you've conditioned Cat as Cat-Only and Dog as Dog-Only. I assume you want to produce Cat Help and Dog Help. Here's how you can get the TOC to work:

-- Add a TOC entry "Viewing a Cat," apply the Cat-Only condition to the TOC entry, and link it to Viewing_a_Cat_Dog.htm.
-- Add a second TOC entry "Viewing a Dog," apply the Dog-Only condition to the TOC entry, and link it also to Viewing_a_Cat_Dog.htm.

When you produce the Cat Help, exclude Dog-Only. The "Viewing a Dog" TOC entry will be excluded from the output.
When you produce the Dog Help, exclude Cat-Only. The "Viewing a Cat" TOC entry will be excluded from the output.

BTW, have you considered using variables instead of applying conditions? It is possible to use variables in TOC entries, though I forget at the moment how to do so. It requires manually typing in the variable string. (I don't have Flare open at the moment, 'cause I'm writing this on my iPad!)

I hope my explanation is useful to you.
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: 3290
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Condition tags not working in TOC

Postby GregStenhouse on Tue Nov 27, 2012 5:25 pm

Do you mean the topic title is blank (in which case the first heading is used) and that heading has conditions?

If that's the case, then the conditions won't be reflected in the TOC when you first add the topic to the TOC. You can override that (by highlighting and pressing F2) with whatever label you want (for one TOC/target change to "View a Cat", for the other use "View a Dog"). For our projects - in the final output (in the HEAD of the HTML) the topic title is showing correctly depending on conditions.

Hopefully that helps, if not can you let us know the version of Flare you're using and a bit more about the problem?

Cheers
Greg
GregStenhouse
Sr. Propeller Head
 
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Condition tags not working in TOC

Postby SharcSL on Tue Nov 27, 2012 7:32 pm

Answering Nita's questions/statements.
Yes, your explanation is useful to me.

The guesses you made are correct. I was hoping I wouldn't have to manually change the TOC entry each time I there is a topic where I've added conditions to the topic title (heading). We are going to have a very long TOC so having to manually enter or correct the heading in the TOC would be time consuming.
I found this topic in the flare help: How to automatically set the title for a TOC entry in the Automatically Set the Title for a TOC Entry
which seems to be a way to get the TOC to automatically update if I change the topic heading in a linked file.

I'm using Flare 8. And I did apply conditions to the TOC. One TOC is "Cat" only and the other TOC is "Dog" only. To apply conditions to the TOC, I right-clicked the TOC, clicked Properties, clicked Contional Text, and then selected the "Cat" tag for the Cat TOC.

I hadn't considered using variables because the items that would need to be replaced apply to a small set of topics. But I'm willing to give variables another look.
I'm guessing that a variable would be for example, Yellow. At build Yellow would be replaced with Cat in the Cat.htm file. And in the Dog.htm file, Yellow would be replaced with Dog at build time.



Answering Greg's questions/comments:
No. The topic title is not blank. The topic title is Viewing a Cat (condition C) Dog (Condition D).
I applied conditions to parts of the heading.

Pressing F2 doesn't do anything.

Thank you for your help.

Thank you,
SharcSL
SharcSL
Propeller Head
 
Posts: 27
Joined: Thu Oct 04, 2012 2:26 pm

Re: Condition tags not working in TOC

Postby mafaulkner on Wed Nov 28, 2012 2:13 pm

Situation:

One topic has a title with condition tags (Cat and Dog), so that different versions of the title appear in Cat Help and Dog Help. Ideally, the Cat TOC and Dog TOC would recognize those condition tags and display different titles also.

Solution:

You (Greg and Nita) seem to be saying that the only solution is to change the TOC entries (topic titles) manually to match the Cat version and the Dog version of the topic. Is that right?

This is going to be pretty labor-intensive! Looks like a candidate for a feature request.
mafaulkner
Propeller Head
 
Posts: 46
Joined: Tue Jul 03, 2012 5:42 pm

Re: Condition tags not working in TOC

Postby Nita Beck on Wed Nov 28, 2012 3:42 pm

mafaulkner wrote:...seem to be saying that the only solution is to change the TOC entries (topic titles) manually to match the Cat version and the Dog version of the topic. Is that right?

As I mentioned in my response, one could use variables instead of conditions to swap in the correct term.
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: 3290
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Condition tags not working in TOC

Postby mafaulkner on Thu Nov 29, 2012 1:13 pm

But it's the "manual typing" we were hoping to avoid, since we've already tagged the titles in the topics themselves!

Thanks.

Melinda
mafaulkner
Propeller Head
 
Posts: 46
Joined: Tue Jul 03, 2012 5:42 pm

Re: Condition tags not working in TOC

Postby erineaster1 on Fri Dec 07, 2012 3:22 pm

Hello, I've recently switched to using Flare from FrameMaker and have a similar situation as the original post. I have several topics where the titles contain conditional text. While it seems absurd that the Table of Contents labels don't automatically update to match the topic titles, I'll accept it for now. I have a small enough number of these topics that I can certainly add multiple entries to the TOC and control them using conditions in the TOC itself. My question is how to handle it for book labels in the TOC. Here's a specific example:

Let's say my TOC looks like this:
CatDog Supplies
  • brushes
  • food
  • toys

The CatDog Supplies book links to an introduction topic called cat_dog_supplies.htm where the title has the text "Cat" set to the "Cat Only" condition and the text "Dog" is set to the "Dog Only" condition. How do I make my label in the TOC show as "Cat Supplies" for the cat target and "Dog Supplies" for the dog target given that the TOC entry in question is a book instead of an individual topic item? Do I have to add the entire book and all of its children twice? That's way more manual work and future maintenance than I'm willing to embark on.
erineaster1
Jr. Propeller Head
 
Posts: 4
Joined: Fri Dec 07, 2012 3:06 pm

Re: Condition tags not working in TOC

Postby Nita Beck on Fri Dec 07, 2012 4:07 pm

erineaster1 wrote:The CatDog Supplies book links to an introduction topic called cat_dog_supplies.htm where the title has the text "Cat" set to the "Cat Only" condition and the text "Dog" is set to the "Dog Only" condition. How do I make my label in the TOC show as "Cat Supplies" for the cat target and "Dog Supplies" for the dog target given that the TOC entry in question is a book instead of an individual topic item? Do I have to add the entire book and all of its children twice? That's way more manual work and future maintenance than I'm willing to embark on.


As I suggested to the original poster, consider using variables instead of conditions. If you have a variable (maybe call it "Animal") in the topic's heading and then drag that topic from the Content Explorer over to the TOC to place it on the TOC, you'll see that Flare inserts the correct coding it needs in the TOC entry to handle the variable. (Or, one can manually type in the code for the variable; I don't have Flare open at the moment so don't exactly remember the format of that code.)

For your Cat target, define the "Animal" variable as "Cat." When Flare builds the Cat target, you'll get "Cat Supplies" in the TOC. For your Dog target, define the "Animal" variable as "Dog." When Flare builds the Dog target, you'll get "Dog Supplies" in the TOC. And if you ever need to add a Giraffe target, you can define "Animal" as "Giraffe."

The fact that the topic is linked to a book in the TOC is irrelevant.

I hope this helps.
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: 3290
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Condition tags not working in TOC

Postby dmarshall on Wed Mar 29, 2017 6:44 am

I'm still looking for something like this. Variables won't work for me, because it's not just single words that I need replaced in different places...

We're using HTML5 online help for several products. Our requirement is that all products should be available from a single webportal, not separate portals for different products.

There are two products which have A LOT in common. I have a few topics which currently look like this:

<Several paragraphs of background about functionality X>
Product A and Product B are both able to do X.
To do X with Product A, type prodA.something
To do X with Product B, type prodB.something

We now want to have this one topic appear in our TOC under both Product A and Product B but, when someone clicks on the topic under Product A, they only see info about Product A (and, likewise, Product B).

I have conditionalised all the Product A and Product B, and tried conditionalising the topics in the Online Help TOC. I had made the assumption that setting a condition on the topic in the TOC would allow me to select which conditions can be used in that topic in that place in the TOC, but that doesn't seem to be a case.

I'm stumped about what to do as a workaround. Using snippets for shared content would be a major pain in the backside, because it's more a few words and a couple sentences that *differ*.
dmarshall
Jr. Propeller Head
 
Posts: 6
Joined: Wed May 25, 2016 3:43 am

Re: Condition tags not working in TOC

Postby devjoe on Wed Mar 29, 2017 11:35 am

I understand your concern, but using snippets (and two topics whose content is mostly in a snippet) is the right way to do what you want. If you only have one topic and one output, the output only has one topic which can only appear with one set of content.

Besides that, using the same topic more than once in the table of contents is a bad idea. This breaks TOC-sync if you are using a format that uses it (since the help system cannot know which TOC entry to sync to - it will go to one of them but maybe not the one you want).
devjoe
Sr. Propeller Head
 
Posts: 312
Joined: Thu Jan 23, 2014 1:43 pm


Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 1 guest

cron