Advance conditional tags

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Mritunjay_g
Propeller Head
Posts: 74
Joined: Tue Apr 11, 2017 11:56 pm

Advance conditional tags

Post by Mritunjay_g »

Hi All,

Is MadCap support conditional tags at advance level like RoboHelp does ?

I have more than 5 client to whom I have to provide documentation(online and print), information/feature wise all clients are at different level. Basic conditions like what to show to whom is done.

But, I also need to see which feature is available(or not available) to which client...like wise many more options.

I heard all such facilities are available in RoboHelp.

Can anyone share doc or youtube video?

Thanks in advance

Cheers
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: Advance conditional tags

Post by devjoe »

It's not clear what you are asking for.

In the conditional text tab of the target, at the bottom you can select Advanced and enter your own conditional build expression if the standard include/exclude mechanism is not sufficient. However, that is rarely the case.

As a reminder, the include/exclude mechanism works like this:
  • Content which is not tagged is always included.
  • Content tagged with an excluded tag is excluded, unless the same element is tagged with an included tag. Includes override excludes.
  • The tagging is hierarchical. If a block of content is excluded, tags on elements within that block are not even looked at, even if one of those tags would be included (unless the element uses the unbind option, in which case the element's contents remain in the document - this is used, for example, to remove links without removing the text inside the link).
The typical ways of doing what you describe (all requiring only basic conditional build expressions) are:

Method 1:
Create a tag for each client.
For each optional feature, mark its help with all the tags for clients getting that feature.
In the target for each client, include his tag and exclude all others.

Method 2 (use when you are adding clients frequently and you don't want to have to go back and update every target each time you add a client):
Create a tag for each client, and a general "optional feature tag".
For each optional feature, mark its help with all the tags for clients getting that feature AND the optional feature tag.
In the target for each client, include his tag and exclude the optional feature tag.

Method 3 (if the number of clients outweighs the number of distinct optional features):
Create a tag for each feature.
For each optional feature, mark its help with the tag corresponding to that feature.
In the target for each client, exclude the tags for all features the client doesn't have.
Mritunjay_g
Propeller Head
Posts: 74
Joined: Tue Apr 11, 2017 11:56 pm

Re: Advance conditional tags

Post by Mritunjay_g »

Thanks devjoe,

So, using conditional tags we can just include(visible) and exclude(hide) the features, is my understanding correct?
other than this facility nothing extra can be achieved, correct?

I have not seen but heard that RoboHelp provides more facilities on conditional tags.


Thank you all
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Advance conditional tags

Post by NorthEast »

Mritunjay_g wrote:Thanks devjoe,

So, using conditional tags we can just include(visible) and exclude(hide) the features, is my understanding correct?
other than this facility nothing extra can be achieved, correct?

I have not seen but heard that RoboHelp provides more facilities on conditional tags.


Thank you all
What exactly do you want to do with the conditions, and what 'extra' functionality did you require?


Ultimately, conditions are used to either exclude or include content.

You can choose to exclude/include the content marked with conditions at different levels:
* In a target (output).
* In a snippet, which is a re-usable piece of content that you can use multiple times n a target.

You can choose how to handle conditions by:
* Using a 'Basic' exclude/include.
* Construct 'Advanced' expressions using and/or/not logic.

For information:
* Video on conditions: https://www.youtube.com/watch?v=Oc2jmTTyZ6o
* Help on conditions: http://webhelp.madcapsoftware.com/flare ... n_Tags.htm
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: Advance conditional tags

Post by devjoe »

In addition to applying conditional tags in what is perhaps the most obvious way by applying them to bits of content in your topics, conditional tags can also be applied to TOC entries and to any whole file in the content explorer including images, and also to files in the project organizer where that makes sense, such as the context-sensitive help files under Advanced. Files which are not XML-based get conditions applied via a .props file which sits beside the main file.

Another way to vary content between topics is to use variables. Variables can have multiple values and you can select in each target which value to use for each variable.

I am not aware of any conditional tagging features in RoboHelp that do not have an equivalent in Flare, except RH's use of conditional text in Word source projects. As far as I know, no software exists which automatically ports that stuff over into HTML-style conditional text, not even RoboHelp HTML! I had to do some crazy scripting to deal with a large project in that format which had three different outputs and stuff with every possible condition.
Mritunjay_g
Propeller Head
Posts: 74
Joined: Tue Apr 11, 2017 11:56 pm

Re: Advance conditional tags

Post by Mritunjay_g »

Thank you Dave Lee and Devjoe.
ThomasK
Jr. Propeller Head
Posts: 9
Joined: Wed May 10, 2017 6:09 am

Re: Advance conditional tags

Post by ThomasK »

Continuing on with this topic,
does anyone know if there is a way to change the include or exclude state of a conditionally tagged piece of content based on the value of a variable?

We have a project where we'd like to automatically generate the documentation (read: without human intervention), where the variables are generated from a database and pumped into the variable XML file.
What we're trying to avoid, is having to parse the variable values first as well to also generate the condition sets on the fly, but rather let madbuild take care of that part... :roll:

The basic behavior we're looking for would be something like this:
if variable.value >= 5
include conditional.highValue
else
exclude conditional.highValue
jjw
Sr. Propeller Head
Posts: 133
Joined: Thu May 08, 2014 4:18 pm
Location: Melbourne

Re: Advance conditional tags

Post by jjw »

ThomasK wrote:Continuing on with this topic,
does anyone know if there is a way to change the include or exclude state of a conditionally tagged piece of content based on the value of a variable?
Could you maybe run a pre-publication script to edit the condition expression in the fltar file based on the value of the variable?

J
ThomasK
Jr. Propeller Head
Posts: 9
Joined: Wed May 10, 2017 6:09 am

Re: Advance conditional tags

Post by ThomasK »

We certainly could DIY this using scripts and implementing our own "syntax", but I was hoping that MadCap would have something in place already.
It's always better to try and use standard features than it is to create complex workarounds that break with the next update comes around. :mrgreen:
Post Reply