Skip to main content
Inspiring
November 17, 2008
Question

Interaction of Dropdown and Conditional text

  • November 17, 2008
  • 5 replies
  • 718 views
In my project I create both CHM and PDF deliverables, and use Conditional Text to suppress CHM navigational items ("click here to ...") in the printed version.

I want to use dropdown text to show/hide a section of text (a list of preconditions), but I want the text to be included in the PDF. So I have the sentence "For preconditions click here." where "here" is a DHTML hotspot for the dropdown text.

But if I use conditional text to suppress this message I also lose the dropdown text in the PDF. I managed to get it working by including one character (the period) in the DHTML hotspot and excluding it from the conditional text, but this is a very inelegant solution. Is there a better way to do it?

I have RoboHelp 7.02.001.

--- Derek
This topic has been closed for replies.

5 replies

Inspiring
November 19, 2008
Thanks for your interest, Rick.

But I still can't get it working.

Directly inserting a snippet into the dropdown doesn't work, but your idea of pasting from the clipboard does work. And the dropdown snippet is successfully suppressed in the print output (Condition: Print). As you had noted, the Preview window result is sometimes incorrect, but after compilation the snippet is present and updated.

But I couldn't suppress the "fixed" snippet in the Online output. Indeed, if I peek in the HTML I see that the "x-condition: Print;" ends before the "placeholder" of the snippet, and begins again afterwards.

I tried editing the HTML directly; adding the x-condition to the placeholder, then wrapping the snippet in a <span>, but RoboHelp silently cleaned up my efforts.

Any other suggestions?

--- Derek

Inspiring
November 18, 2008
Alas, it doesn't seem to be possible. Oh well....

--- Derek
Captiv8r
Legend
November 18, 2008
Tell me it ain't so!

I've done this by inserting the snippet on the topic just below the text I wish to use for the drop-down trigger. Then select it and cut it to the clipboard. Now paste it into the little DHTML Drop-Down window.

In preview, it would appear the snippet has lost connection with the drop-down contents. (I tried changing the snippet to see if it would reflect in the topic) But I also tried compiling a CHM and it seems to update just fine in the compiled output.

Maybe this will work for you too.

Cheers... Rick
Peter Grainge
Community Expert
Community Expert
November 18, 2008
Not sure, can you put Snippets in dropdowns?

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Inspiring
November 18, 2008
Thanks Peter, I had a similar idea yesterday as I cycled home.

It works, but is still not optimal since it involves double information; if a precondition changes I must remember to change both the PDF text and the dropdown.

But it's probably the best I'll get.

--- Derek
Peter Grainge
Community Expert
Community Expert
November 18, 2008
Try two sentences and duplicating the dropdown, one for online and one for print. For print "The preconditions are:"

Then by use of appropriate expressions you use the sentence for the media.

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.