I can't find an HM7 Bug Reports section, so I'm posting this here.
In EWriter you may want to include a link to the same topic in Webhelp, so that users can check for any updates since the executable was distributed.
If the PHP option is being used for the Webhelp, the link in EWriter fails, because in EWriter <%HREF_CURRENT_PAGE%> always has .htm extension.
I can fix this with some javascript in the topic template, but that's a workaround for what is actually a bug (there being no other obvious use for <%HREF_CURRENT_PAGE%> in EWriter).
Please can EWriter reference the Webhelp output setting when parsing <%HREF_CURRENT_PAGE%>, or alternatively can we have an option in the EWriter settings to set the required extension directly?
Martin.
EWriter <%HREF_CURRENT_PAGE%>
Moderators: Alexander Halser, Tim Green
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
- Tim Green
- Site Admin
- Posts: 23184
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: EWriter <%HREF_CURRENT_PAGE%>
Hi Martin,
This is not a bug. The variable is always returning the correct value for the current context, because it is specifically designed for references within the current project. And since the topics have the extension .htm in EWriter it is returning the correct address. If you need to reference the external version it's easy to either rewrite what the variable returns with JS, or use the <%TOPICID%> variable and add the relevant extension.
However, TOPICID returns the variable exactly as it is written in your project, not downcased. So you will only be able to use it without JS to downcase it if the IDs are already all lower case in your project. then you can create a link with:
Otherwise, you need to downcase and create the link with JS.
This is not a bug. The variable is always returning the correct value for the current context, because it is specifically designed for references within the current project. And since the topics have the extension .htm in EWriter it is returning the correct address. If you need to reference the external version it's easy to either rewrite what the variable returns with JS, or use the <%TOPICID%> variable and add the relevant extension.
However, TOPICID returns the variable exactly as it is written in your project, not downcased. So you will only be able to use it without JS to downcase it if the IDs are already all lower case in your project. then you can create a link with:
Code: Select all
href="http://www.wherever-your-help-is.com/<%TOPICID%>.php"
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.
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: EWriter <%HREF_CURRENT_PAGE%>
Thanks Tim. I assumed that the topics in EWriter are string resources in the executable rather than files, so they wouldn't have an extension. But even if they are files, it is difficult to see how <%HREF_CURRENT_PAGE%> could be used within EWriter, other than as an external link.Tim Green wrote:This is not a bug. The variable is always returning the correct value for the current context, because it is specifically designed for references within the current project. And since the topics have the extension .htm in EWriter it is returning the correct address.
However, I'm happy to work round it if that's what is necessary. Rather than create the link in the client, I think it would be better to do any processing on the server, so the link becomes
Code: Select all
href="http://www.wherever-your-help-is.com/view_topic.php?ID=<%TOPICID%>"
regards,
Martin.
- Tim Green
- Site Admin
- Posts: 23184
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: EWriter <%HREF_CURRENT_PAGE%>
Hi Martin,
EWriter really is packaged WebHelp. Effectively, it uses the same model as CHM, but with a full WebHelp package inside an archive instead of just a folder of HTML files. The viewer is the embedded Internet Explorer, with quite a lot of management in the "wrapper" to make sure that it plays nice with the WebHelp contents.I assumed that the topics in EWriter are string resources in the executable rather than files, so they wouldn't have an extension.
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.