Page 1 of 1

Conditional links in same output?

Posted: Thu Jun 12, 2008 1:34 am
by odyssey
One of the things that appealed to me about Flare was the fact that I could do conditional links - I'm using it to build an implementation methodology, and want to have people able to drill down from a common, high-level view to the details for their own roles, without having to wade through what everyone else is supposed to be doing.

It appears, though, that the conditions only apply to different outputs, which help me a bit, but isn't what I was looking for. If someone is only interested in role 1, then it's fine, can build a specific output for role 1. But for project managers and some cross-functional people, they need to be able to know what the other roles are doing or switch between multiple roles, so they need a way to access multiple conditional links in the same build. I was hoping to have a drop-down box in which the user could choose the role to be shown, and then have all the links refer to that value to determine their targets.

Is there a way to have a condition on a link that is drawn from a variable in the page, and not determined during the build?

Thanks!

Darryl

Re: Conditional links in same output?

Posted: Thu Jun 12, 2008 4:02 am
by i-tietz
Hi Darryl,
odyssey wrote:Is there a way to have a condition on a link that is drawn from a variable in the page, and not determined during the build?
I say: "Yes."

You can have multiple conditional tag sets and with none or only one of them relevant for collecting the topics for the target help: Just ignore them in the target.
In the target you use for producing the help you'll find a tab called Conditional text. There you will find all the conditions in all the condition tag sets yo have in the project. You will see that the controls there are checkboxes, means: You don't have to check them - leave them all unchecked, just ignore all the conditions you use for different purposes like distinguishing one role from another.

You can generate a snippet with conditional text - one condition for each role.
You insert the snippet in topics that have snippet conditions, e.g. the topic one.htm has the snippet condition ROLE1. That means: Only that part of the snippet will be displayed, which is unconditioned or has the condition ROLE1.
You will still have to have different topics for different roles, but it works.

We are using it for our software for merchandise management: We have help topics that look almost the same for sales and for purchasing documents. We produce a snippet that contains all the content and apply the conditions S and P to the relevant text passages. We insert the snippet in two topics in two different folders. Folder A has the condition S and folder B has the condition P. All the topics in folder B(P) turn out as descriptions of creating purchasing documents and all the topics in folder A(S) turn out as descriptions of sales documents (e.g. incoming order, delivery note, outgoing invoice) ...
When it comes to building a target we use the conditions X or Y and leave the conditions S and P unchecked, means we neither include nor exclude them - the conditions S and P still apply to the folders and their topics in the manner described above.

Re: Conditional links in same output?

Posted: Thu Jun 12, 2008 4:10 am
by RamonS
Currently, there is no such function, but I had the same idea as well. I think it is a case that comes up with any software that was various user levels and exposes different parts of the interface based on that level. I sent a feature request to MadCap to have conditions applied at runtime by specifying a property in the help call similar to how it is done with multiple skins. The problem here is that the ToC, links, and Index need to be recompiled at runtime. That is only possible with outputs that MadCap has control over and that lend themselves to such manipulation. That means that CHM and print outputs cannot offer this. That leaves WebHelp and DotNetHelp.
The most flexible way is to do that on the client side. For WebHelp that would be ECMAScript and for DotNetHelp code in the proprietary viewer. WebHelp also offers the option to do that on the server side, but that limits this option to hosted versions. And in that case I really wish MadCap would use some cross-platform capable scripting such as PHP so that one can enjoy this feature without having to suffer from using IIS.
Add your name to the request here: https://www.madcapsoftware.com/bugs/submit.aspx