• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Conditional Text Question

Guest
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

Hi,
Is it possible to make a style within the CSS conditional? Rather than mark lines of text as conditional (not for print), I'm wondering whether I can simply apply a style to them and indicate only one time that the style itself should not print.
I'm outputting webhelp from RH7.
Thanks.

Views

953

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

No way that I am aware of.

You can specify a style that appears in the editor but not in any output. However, I believe you want the content to only be hidden in the printed output.

I am not clear though as to how that would be an advantage. One way you apply a tag, the other way you apply a style. Either way requires much the same amount of work.

What you could do is apply a CSS style called 'noprint'. When you generate your Word document map to a style in your template called 'noprint' and then use Word to find all paragraphs with that style and delete them.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

ConTextCB,

It sounds like you want to use a media-specific style, as in the example below. Anything that is tagged with the style ScreenOnly is visible onscreen but hidden when printed.

More information here:

http://meyerweb.com/eric/articles/webrev/200001.html

Pete

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

Thanks to both Peter and Pete, or should I say Repete?
I plan to use a link labeled 'top' that goes to a bookmark at the very start of the page. This will appear only in long topics. I don't want the 'top' link to appear in the PDF output. I completely understand that styling the link will probably take as much time as marking it conditional; however, I am hoping to minimize the likelihood of forgetting the conditional tag. Because 'top' is already a style, I'd like to knock it off in one step.
I'll take a look at the code.
Thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

Hi ConTextCB

As far as your bookmark goes, perhaps you may also consider changing your approach. You can easily simplify this by omitting the actual bookmark. For example, if it's named 'Top'. Then where your links formerly pointed to #Top, amend them to simply point at #. The end result should be a cleaner behavior, less code and less to keep in mind as there is no need to create the bookmark. Pointing to # simply causes the page to reload and display from the beginning.

Just a thought... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

Rick,
Thanks for the tip. I've been using RH for several years and never knew about the #! How humbling. Great tip.
Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

So this style will never appear in any output?

If that is the case try

P.HiddenBookmark {visibility: hidden;}

You don't have to call it HiddenBookmark. Change that to whatever you want.

That will allow you to see it in WYSIWYG but not in any output, online or printed.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

Hi Peter,
I do want the 'top' tag to appear in the Webhelp output, just not the PDF output. So, for my edification, can you explain a bit more about the P.HiddenBookmark/ Where do I add that and where do I specify the hidden parameter?
Thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

I think this has been overtaken by Rick's suggestion but the method I suggested will apply to all outputs so it is of no use if you want it to appear in your webhelp. Otherwise you would just add visibility: hidden to the style definition.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

Hi Peter

Hmmm, I wouldn't think my suggestion would have changed anything with respect to what prints or what you were talking about with respect to hiding things during print. I was only offering a way to simplify the page. What I suggested would only apply to what appears totally behind the scenes, not the visible part. For example, yes we eliminate one bookmark, but nobody sees that. The link still remains.

So everything you were discussing before still applies.

Cheers all... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

I wasn't suggesting it would. I was simply advising ConTextCB about using the hidden style I had suggested earlier. Nothing whatever to do with your reply.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2008 Feb 12, 2008

Copy link to clipboard

Copied

Out of curiosity I tried the idea of specifying two style sheets. RH will only work with the style sheet that is specified in Topic Properties. It ignores any other references added in code/html view.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Feb 12, 2008 Feb 12, 2008

Copy link to clipboard

Copied

First, RH doesn't always interpret the @media function properly.

Second, I think you're doing yourself a disservice by ignoring the use of conditionals in a situation that is tailor-made for them. Once you have set the proper conditionals in your WebHelp SSLayout and in your PrintDoc SSLayout, there's no "likelihood of forgetting the conditional tag," is there?

If there's anything I've learned over the years using HATs, it's these things:

1. What's the simplest to maintain...tomorrow...next week...next month...as the project grows and grows?
2. How does this HAT handle this (HTML, CSS, JavaScript, etc.) feature?
3. Just because you can, doesn't mean you should.

Good luck,
Leon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 12, 2008 Feb 12, 2008

Copy link to clipboard

Copied

LATEST
Thanks to everyone for the feedback. I will be using conditional tags...I certainly understand the value they offer and didn't mean to imply otherwise. Just trying to do my due dilgence.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp