Copy link to clipboard
Copied
I use a content-level condition tag in every topic that certain info is for online only. Works perfectionly except in 2 topics where the topic itself is tagged (as US-only). In those 2 topics, the online content is appearing even though I am using a condition expression for Print/US-only. Must I choose between topic-level and content-level conditions, or is there a way to use both?
I've always found Exclude is the better option to use in condition expressions. The 'Include' is kind of an override for any exclusions and I find it harder to figure out what is included and excluded. So I normally set my expressions up as "exclude x, y and z".
You seem to say all your online content is tagged and you're generating for a print output? If so, perhaps try adding "AND EXCLUDE Platform.Online".
Copy link to clipboard
Copied
What version of RH? Classic or New UI?
Copy link to clipboard
Copied
Also, if you can post your condition expression that will help.
Copy link to clipboard
Copied
Oops, sorry - New Here. My version is Version 2020.7.46 so that's new UI.
The condition expression is: Include when Audience is US OR include when platform is Print.
That seems to work for all topics that are not conditioned at the topic level.
Thanks for your help.
Copy link to clipboard
Copied
I've always found Exclude is the better option to use in condition expressions. The 'Include' is kind of an override for any exclusions and I find it harder to figure out what is included and excluded. So I normally set my expressions up as "exclude x, y and z".
You seem to say all your online content is tagged and you're generating for a print output? If so, perhaps try adding "AND EXCLUDE Platform.Online".
Copy link to clipboard
Copied
Oh my gosh, it worked! I confess I can get myself mighty confused with the includes and excludes. Thanks for your help.
Copy link to clipboard
Copied
As @Amebr has said, exclude has always worked better with RoboHelp. There's another reason to not use include. The way 2020 works is different to the Classic versions. To get a topic into the output it has to be in the TOC, it doesn't have to be seen by users as there is a Hide option. That is all explained in RH2020 The Table of Contents (grainge.org).
If you have one TOC for online and one for print, that's the Includes taken care of.
________________________________________________________
My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.
Copy link to clipboard
Copied
Oo, thanks for the bonus lesson. I'll take a look at that and see what changes I can make.
Now if I could get table headings to repeat across page breaks automatically, I'd be a fairly happy camper!
Copy link to clipboard
Copied
I have a solution for PDF but it doesn't work for Word output. It requires both html and css code changes, so let me know what you're producing and if you want to delve into the depths 🙂
Copy link to clipboard
Copied
OMG, so excited. I produce html and PDFs, that's it. No Word. In fact, I've never even gotten this version of RH to generate Word output. But I am fearless when it comes to messing around in the html and css so I'd love to hear your solution. I only have 1 table style I use so that might simplify things.
Copy link to clipboard
Copied
Okay, try this (perhaps in a test project first or at least with a good backup of your real project 🙂 ).
This assumes your table header is only a single row. If you have multiple row headers, adjust the instructions for the number of rows.
<tbody>
<tr>
<td>Heading</td>
<td>Heading</td>
</tr>
<tr>
etc...
Open your topic and highlight the first cell of your table, then switch to code view (highlighting just means your cursor will remain in the right place in the topic, rather than possibly moving to the start of the topic).
Find the <tbody> tag and move it below the first closing tr tag (</tr>)
<tr>
<td>Heading</td>
<td>Heading</td>
</tr>
<tbody>
<tr>
etc...
Now place <thead></thead> around your first row. Note that RH autocompletes the tag, so make sure you don't accidentally duplicate the close tag.
<thead>
<tr>
<td>Heading</td>
<td>Heading</td>
</tr>
<thead>
<tbody>
<tr>
etc...
This should make your header row repeat across pages. However, because of the default RH css, the first row of data will be formatted like your header.
Open your stylesheet and switch to the code editor.
Find the line that looks like:
table.MyTableStyle tr:first-child td
Change it to:
table.MyTableStyle thead
Now the first row of data should look just like your other data rows.
The topic change will need to be made in every topic you use a table. Going forward, I recommend setting up a blank table with the code change as a snippet. When you want to insert a new table, insert the snippet, and then right-click and "Convert to HTML Text"
Note I haven't used this in real life, only tested it in a fresh test project. You'll need to test thoroughly in your project.
(It should also mean the header repeats if someone prints from the browser as well but I haven't tested that - make sure you test in multiple browsers as not all browsers work the same way.)
Copy link to clipboard
Copied
That works (at least in my so-far limited testing)! Mine is a little bit different:
I changed my topic code to this since I use a th for the heading rows, not td:
<thead>
<tr>
<th>Question</th>
<th>Use in this field</th>
</tr>
</thead>
I replaced "table.BrandNameTable th>*:first-child," with "table.BrandNameTable thead>," in my CSS.
When I generated the PDF output in the test project, it worked. When I generated frameless output, it didn't appear differently than before (desired outcome). That was very limited testing so I'll do more obv but that is very hopeful. Thanks so much for your help!
Copy link to clipboard
Copied
It won't duplicate the heading for online output because the table only appears on one "page". What behaviour are you hoping for in the online output? Do you have an example you can link to?
Copy link to clipboard
Copied
Oh no, I wasn't clear. It's working as desired online - as you said, it considers it one page.
I spent time yesterday implementing the solution in many topics. Very easy to implement, but I never would have figured it out. Thanks again!
Copy link to clipboard
Copied
Hi, I have a similar problem. I use RH 2022.0.260.
I usually use topic-level condition tags (Tag A and B). In the output for A, I only exclude B. That works.
Now, I added a content-level tag: The topic in question does not have and topic-level tags. I added Tag A for one link, and Tag B for a second link:
<p><span data-condition="Product:Tag A"><a data-xref="{title}" href="../Text.htm">Link X</a></span></p>
<p><span data-condition="Product:Tag B"><a data-xref="{title}" href="../Text.htm">Link Y</a></span></p>
If I try to get that output - I have not changed anything else - my HTML comes up completely empty except for my start page.
I can reproduce this: If I remove the tags on content-level, everything goes back to normal.
Anyone got any ideas? Or is this a bug introduced by the new version? There seems to be a bug concerning that: I have to set the tags in the source code at the moment, as the editor won't let me add any tags.
Copy link to clipboard
Copied
Do you mean 2020.0.260? If so, there is a patch 8 available. You will need to download the patch manually as there was a bug in that 2020.0 version: https://community.adobe.com/t5/robohelp-discussions/how-to-upgrade-robohelp/td-p/11765263
Copy link to clipboard
Copied
I should note I don't know if there were any fixes related to your issue, but there have been many other fixes so that would be the first thing to try.
Copy link to clipboard
Copied
No, I actually mean 2022, the new beta release. 🙂
Copy link to clipboard
Copied
@Carolin1234 in that case you should be posting over in the Prerelrease Forum (not here) 😉