Page 1 of 1

Conditional text fragments

Posted: Tue Sep 18, 2018 8:16 am
by marisoul
Hi all,

I have a topic that I'd like to use in more than one chapter. The content is slightly different, and is based on the specific chapter. For example: in one chapter I describe PART A and in the next I describe PART B. I have set two conditions: PART A and PART B. In the TOC, I've placed the same topic under two chapters, where I've checked 'PART A' in the topic's properties in the first chapter, and 'PART B' in the topic's properties in the second chapter. All is published in one PDF file.

I am aware that the PDF displays all conditions next to each other, and that conditions only have effect if I have use PDFs. But this is not the case here.

So: is there a way to use conditional text in 1 topic within the same PDF? Thanks in advance.

Re: Conditional text fragments

Posted: Tue Sep 18, 2018 11:05 am
by Nita Beck
There is not a way to control the conditioning you seek merely by what condition you have applied to a TOC item.

I suggest that you put the guts of the topic into a snippet, with your Part A and Part B conditioned content.

Then have two separate topics, each with its own heading followed by the snippet. In the first topic's properties, on the Snippet Conditions tab, set it to exclude Part B content. Set the second topic's Snippet Condition to exclude Part A.

Now put the topic that will show only Part A in the chapter where it belongs, and put the topic that will show only Part B in the chapter where it belongs.

HTH

Re: Conditional text fragments

Posted: Fri Sep 28, 2018 5:26 am
by marisoul
Nita Beck wrote:There is not a way to control the conditioning you seek merely by what condition you have applied to a TOC item.

I suggest that you put the guts of the topic into a snippet, with your Part A and Part B conditioned content.

Then have two separate topics, each with its own heading followed by the snippet. In the first topic's properties, on the Snippet Conditions tab, set it to exclude Part B content. Set the second topic's Snippet Condition to exclude Part A.

Now put the topic that will show only Part A in the chapter where it belongs, and put the topic that will show only Part B in the chapter where it belongs.

HTH
Dear Nita,

Your suggestion worked perfectly. Many thanks.

Kindest,
Linda