In a CHM help set-up, how do I automatically redirect to a specific page (e.g. index.html) if the page called from the application does not exist?
If our programmers automatically generate the page names from the application and the CHM is out of date, I cuurently get a "Page cannot be disaplyed" error. I'd like to avoid that.
In addition, some of the auto-generated page names could link to already existing pages in the help without having to duplicate content.
CHM -- redirect if page not found
Moderators: Alexander Halser, Tim Green
- Tim Green
- Site Admin
- Posts: 23157
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: CHM -- redirect if page not found
Hi John,
That is what A-Links are for in CHM:
https://helpandmanual.com/help/index.ht ... alinks.htm
However, this only works for links within the CHM itself, not from outside. There is actually support in the CHM system for doing this with links from outside, and this is documented in the help file for HTML Help Workshop from Microsoft. However, this has never ever worked and Microsoft has never fixed it or explained why it doesn't work. That was all released with Windows 98 and has never been changed or corrected since then...
That is what A-Links are for in CHM:
https://helpandmanual.com/help/index.ht ... alinks.htm
However, this only works for links within the CHM itself, not from outside. There is actually support in the CHM system for doing this with links from outside, and this is documented in the help file for HTML Help Workshop from Microsoft. However, this has never ever worked and Microsoft has never fixed it or explained why it doesn't work. That was all released with Windows 98 and has never been changed or corrected since then...
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 305
- Joined: Mon Aug 21, 2017 7:35 pm
Re: CHM -- redirect if page not found
Hi Tim,
Thanks.
As the call is coming from the application, i.e. outside the CHM, the A-links will not work then if I understand you correctly.
I was hoping for a fall-back mechanism to avoid a "Page not found" error when the user presses F1 in the application but the HelpKeyword "nameofpage.html" is not present in the CHM.
Thanks.
As the call is coming from the application, i.e. outside the CHM, the A-links will not work then if I understand you correctly.
I was hoping for a fall-back mechanism to avoid a "Page not found" error when the user presses F1 in the application but the HelpKeyword "nameofpage.html" is not present in the CHM.
- Tim Green
- Site Admin
- Posts: 23157
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: CHM -- redirect if page not found
Hi John,
You can't have it do that for a normal topic link. There is a facility for a fallback in that case in CHM, but as I said it just doesn't work. You would need to call the HH_ALINK_LOOKUP command for viewing the file instead of the normal help call (see the reference in the HTML Help Workshop help file for details), and for that to work you would have to set up A-Keywords for all your topics, because you would not be calling the topic IDs any more. Also, if the topic IS there, the call will not go directly to the topic; instead, the user will get a dialog in which they choose which topic they want to see -- the topic you actually want to link to or the other topic containing the same A-Keyword (the fallback).
That is not really better than having the occasional topic not found message...
You can't have it do that for a normal topic link. There is a facility for a fallback in that case in CHM, but as I said it just doesn't work. You would need to call the HH_ALINK_LOOKUP command for viewing the file instead of the normal help call (see the reference in the HTML Help Workshop help file for details), and for that to work you would have to set up A-Keywords for all your topics, because you would not be calling the topic IDs any more. Also, if the topic IS there, the call will not go directly to the topic; instead, the user will get a dialog in which they choose which topic they want to see -- the topic you actually want to link to or the other topic containing the same A-Keyword (the fallback).
That is not really better than having the occasional topic not found message...
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 305
- Joined: Mon Aug 21, 2017 7:35 pm
Re: CHM -- redirect if page not found
Thanks again, Tim.
right as usual
right as usual