Conditional text and keywords

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Mike Scott
Posts: 101
Joined: Wed Jul 27, 2005 10:32 pm
Location: Stroud
Contact:

Conditional text and keywords

Unread post by Mike Scott »

Am wondering if I can get keywords to appear conditionally. (I have images and text conditional on IFDEF .. ELSE .. ENDIFs as expected.) All attempts thus far not succeeding in the Index or the Keywords box in Topic Options.....
And also not succeeding in getting a final bulleted list item in text (<li>... </li>) not to show the bullet where the condition is not met. I then edited the XML to put the <li> and </li> within the IFDEF .. ENDIF but when I saved the whole condition disappeared in a puff of smoke. :?

Cheers -- MIke
Mike Scott
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Conditional text and keywords

Unread post by Tim Green »

Hi Mike,

You can't apply conditions to keywords in the Topic Options panel because the conditional text tool isn't available there. Instead, put the keywords in an anchor, which supports keywords, and put conditional text tags around the anchor. That will achieve what you want and has the additional benefit that keyword links will jump to the anchor position instead of just to the beginning of the topic.
but when I saved the whole condition disappeared in a puff of smoke.
That means your XML was invalid. Although it looks a little like HTML, XML is a completely different language. Its great benefit -- which also makes it difficult to work with -- is that unlike HTML, which allows all kinds of errors, XML is 100% strict. Even the smallest syntax error will make the entire page or file 100% invalid. When you edit the XML Help & Manual checks your syntax and silently discards anything invalid.
And also not succeeding in getting a final bulleted list item in text (<li>... </li>) not to show the bullet where the condition is not met.
The trick to this is understanding how to cut out an entire paragraph with an IFDEF. You need to put the IF tag at the end of the previous paragraph, and the END tag at the end of the paragraph you want to exclude. Then it will work. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Mike Scott
Posts: 101
Joined: Wed Jul 27, 2005 10:32 pm
Location: Stroud
Contact:

Re: Conditional text and keywords

Unread post by Mike Scott »

Brilliant, thanks. Learn something new every day -- I had never used the Ctrl/K combination, only the Topic Options route for inserts keywords. Bulleted list is now OK too. Excellent and very prompt support as usual! :D

Mike
Mike Scott
Post Reply