Highlighted

Conditionally show text and link to a merged chm

Enthusiast ,
Dec 08, 2016

Copy link to clipboard

Copied

RH Version: 2015 (build 12.0.3.428)

OS: Windows 10, x64

So, I know when you merge a chm into another chm, it adds a link in the Contents tab if that chm resides in the same folder.

For example, here we're merging an Inform.chm into our Inspect.chm help. Inform.chm is tied to a plugin type component in our application and isn't always installed on every users system.

If the chms are in the same folder, like this:

Then in the chm, it adds in the tab:

This is great, but Is there a way to do the same thing with text and links in an htm page? I want to conditionally add the text "Inform tab" between the "Measure tab" and "Report tab" text so to the user it appears seamlessly in the list of links: 

Has anyone done something like this? Like via scripting somehow?

TOPICS
HTML help

Views

201

Likes

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

Conditionally show text and link to a merged chm

Enthusiast ,
Dec 08, 2016

Copy link to clipboard

Copied

RH Version: 2015 (build 12.0.3.428)

OS: Windows 10, x64

So, I know when you merge a chm into another chm, it adds a link in the Contents tab if that chm resides in the same folder.

For example, here we're merging an Inform.chm into our Inspect.chm help. Inform.chm is tied to a plugin type component in our application and isn't always installed on every users system.

If the chms are in the same folder, like this:

Then in the chm, it adds in the tab:

This is great, but Is there a way to do the same thing with text and links in an htm page? I want to conditionally add the text "Inform tab" between the "Measure tab" and "Report tab" text so to the user it appears seamlessly in the list of links: 

Has anyone done something like this? Like via scripting somehow?

TOPICS
HTML help

Views

202

Likes

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
Dec 08, 2016 0
LEGEND ,
Dec 08, 2016

Copy link to clipboard

Copied

Hmmm, maybe others will offer up a way, but in my own mind I'm thinking your best approach is to simply offer the link but follow it with the disclaimer that it will only work if the Inform Tab project is present.

Cheers... Rick

Likes

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
Reply
Loading...
Dec 08, 2016 0
Contributor ,
Dec 08, 2016

Copy link to clipboard

Copied

Is there a reason you cannot remove the "The main sections..." line, the links, and the note box? If you can, replace those with this text:

|

"Navigate through this help system using the Contents tab on the left side of each page."

|

The user can see the TOC; why do you have to repeat it?

Likes

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
Reply
Loading...
Dec 08, 2016 0
Enthusiast ,
Dec 08, 2016

Copy link to clipboard

Copied

Thanks prhmusic2.
I suppose it's not strictly necessary. But users might want the space and have the tab hidden. But mainly, it's our modus operandi when creating new content, because we don't always know up front if we're going to have to generate printable content from it.

Likes

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
Reply
Loading...
Dec 08, 2016 0
Contributor ,
Dec 08, 2016

Copy link to clipboard

Copied

The reason why the Contents tab can "figure out how to do it" is because the contents in that tab are generated when the CHM file is opened whereas the content that is displayed on the right is (typically) static HTML that the help author created and then published (I equate it with the "I sent it to the printer" concept) so it's trickier to change what is / is not displayed. Not saying it can't be done. It actually was easy to do this with WinHelp macros "back in the day" - there was the IFTHENELSE macro where you could specify the FE (File Exist) macro in the IF section so If the file exists, then display it, otherwise do [some other action] which is how I would make a popup message display.

I do not know the equivalent of how to do that type of coding for a CHM file - not saying it can't be done; I just don't know how....

Paul Hanson

Likes

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
Reply
Loading...
Dec 08, 2016 0
Enthusiast ,
Dec 08, 2016

Copy link to clipboard

Copied

Thanks Rick. I could do that too. Was just hoping there was a way to make it a little cleaner. The Contents tab has figured out how to do it somehow. Was just wondering if the same could be applied to an htm topic.

Likes

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
Reply
Loading...
Dec 08, 2016 0