Page 1 of 1

Using Conditional Tags to Hide Text

Posted: Wed Oct 18, 2017 11:00 am
by BWallace
Forgive me if this has already been asked somewhere, as I have looked and been unable to find it, and I'm fairly new to MadCap Flare. I have recently inherited a rather large help file for a software that my company produces, which allows clients to have specific features. It's fairly obvious how to add sections for them if they have a feature which is specific to them, but if they have parts of the software that do not pertain to them, is there a way to use conditional text to hide a section from only them, without making it conditional to every single other client?

For example I have client A who has requested that sections 2 and 3 be replaced with section 4. The problem with what is shown below is that client A will see all 4 sections, when they should only see 1 and 4. Is there a way I can hide 2 and 3 from them without trying to do a complete overhaul of the entire document where I make all text conditional with the tag of every single client?

<li>1</li>
<li>2</li>
<li>3</li>
<li MadCap:conditions="Clients.A">4</li>

Any help would be appreciated.

Re: Using Conditional Tags to Hide Text

Posted: Wed Oct 18, 2017 1:54 pm
by Paulie
Hi there,

It's hard to give an answer without knowing all of the ways that your conditions could be applied. But, as conditions are predominantly used for excluding content, it might be better to reverse your logic and have a 'Not Client A' condition applied to section 2 and 3, rather than a 'Client A' condition applied to section 4. This condition could then be excluded in your client A target, causing the required behaviour.

Re: Using Conditional Tags to Hide Text

Posted: Wed Oct 18, 2017 2:26 pm
by SteveS
Welcome to the forums :D

Based on the information you have provided, I would set up the customers who require different information with 2 conditions, IncludeForX and ExcludeForX.

You can then (in your example) Apply you IncludeForX on the fourth item and ExcludeForX on items two and three.

I would investigate making the IncludeFor conditions as exclude for all the other customers. If they, too, need a particular element included, adding the IncludeFor condition for them (on a particular element) will override the exclude on that element.

Hope this makes sense (I haven't had coffee yet)...

Re: Using Conditional Tags to Hide Text

Posted: Fri Oct 20, 2017 6:26 am
by BWallace
Ok, I think I'm understanding what you're saying correctly, and doing some extra searches I found this solution, though it may or may not be the most efficient option, so if you happen to know of a better way let me know, but this seems to work. I can set up a new client called NotA, and exclude that client from the printout. If there is a way to do this without creating unnecessary clients like this, I'd appreciate that, but I've tried adding not statements to this in different ways, and it does not really work. I've tried things like "<li MadCap: conditions="not(Cliends.A)"> if that gives a better idea of what I'm trying to do. I also tried looking for statements like a Conditions!="Clients.A" statements and such, to no avail.

<li>1</li>
<li MadCap:conditions="Clients.NotA">2</li>
<li MadCap:conditions="Clients.NotA">3</li>
<li MadCap:conditions="Clients.A">4</li>