eWriter Creator Loses Help Contexts

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Olivier Beltrami
Posts: 393
Joined: Mon Jul 15, 2002 3:30 pm
Location: Nantes, France
Contact:

eWriter Creator Loses Help Contexts

Unread post by Olivier Beltrami »

Hi,

To be able to display a footer that is "per-topic" (instead of being the same for all pages, based on index.html), as shown in the screenshot below, I need to post-process the .ewriter temp files generated by H&M and "re-compile"using the eWriter Creator.

This works quite well, except that when I try to call a help context on the re-compiled file, from Delphi, it fails telling me the page cannot be found. But, if from the very same Delphi EXE, I try to call the help context of the intermediate .ewriter then it works fine.

Is it normal that the eWriter Creator strip-out the help contexts ? Can this be fixed ?

Very best regards,

Olivier

Image
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Tim Green »

Hi Olivier,
Is it normal that the eWriter Creator strip-out the help contexts ?
Yes, because Creator is content-agnostic. It is not designed for Help+Manual projects; it is designed to process any HTML files and will process any HTML files you feed it. If you are using Help+Manual it is assumed you will be creating eWriter with Help+Manual. Creator will process a package of WebHelp source files, but you will not get any HM-specific processing.
Can this be fixed ?
Possibly, but it's unlikely that HM-capabilities will be added to Creator because that is not its purpose. However, there is a much better way to achieve what you are trying to do here: Simply include your "footers" in the body of the topics themselves, so they get processed correctly on publishing. For new topics you can achieve this by putting the footer in a standard topic content template. For existing topics you can process your topic XML files with an external multi-file search and replace tool like Notepad++.
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.
User avatar
Olivier Beltrami
Posts: 393
Joined: Mon Jul 15, 2002 3:30 pm
Location: Nantes, France
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Olivier Beltrami »

Hi Tim,

Thank you very much.

As you suggested, I switched from post-processing the .js and .html files of the temp folder to pre-processing the .xml files of the topics folder, and now it works fine.

Except for one minor issue. How do I turn off the title of the html page from appearing in the title bar (see a screenshot of the corresponding option in the eWriter Creator, below) ? I cannot seem to see where that option is set (and trying to hack the H&M project file using the ini keys names of the .ewcfg file did not yield any result).

Very best regards,

Olivier

Image
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Tim Green »

Hi Olivier,

Nobody has ever asked about this before; I'm checking with our developers why this option isn't currently available in HM itself.
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.
User avatar
Olivier Beltrami
Posts: 393
Joined: Mon Jul 15, 2002 3:30 pm
Location: Nantes, France
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Olivier Beltrami »

Nobody has ever asked about this before
:lol:
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Tim Green »

Hi Olivier,

The eViewer shows the contents of the title tag in the current HTML page, which is the topic in the case of V3 and V4 skins. In the eWriter version this is hard-coded to the topic title, but you can change it to the static display of the project title as follows:

1: Title in the page template

In the HTML page template locate this line at the top:

Code: Select all

<title><%TOPIC_TITLE%></title>
and change it to:

Code: Select all

<title><%TITLE%></title>
2: Disable automatic updating of the title tag

Edit the hm_webhelp.js file and locate this block of code:

Code: Select all

function hmLoadTopic(topicObj) {
	// hmWebHelp.currentTopic = topicObj;
	$("title").text(topicObj.hmTitle);
Comment out the line that updates the title tag:

Code: Select all

function hmLoadTopic(topicObj) {
	// hmWebHelp.currentTopic = topicObj;
	// $("title").text(topicObj.hmTitle);
That's it. In the next update I will make this configurable in the eWriter skins as well, as it is in the WebHelp skins.
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.
User avatar
Olivier Beltrami
Posts: 393
Joined: Mon Jul 15, 2002 3:30 pm
Location: Nantes, France
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Olivier Beltrami »

Hi Tim,

Thank you very much for your response.

One question; when you mention "the HTML page template", do you mean the file "defaultPageTemplate.html" which is inside the "WebHelp3_HM7_hmskin_HTML_Templates" folder itself inside the "Flat_Blue_Diamond_eWriter.hmskin" ?

Very best regards,

Olivier
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Tim Green »

Yes, that's the page template. These skins don't have the Layout template since they are frameless.
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.
User avatar
Olivier Beltrami
Posts: 393
Joined: Mon Jul 15, 2002 3:30 pm
Location: Nantes, France
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Olivier Beltrami »

Hi Tim,

Thank you very much for your response.

The change to the JS file does stop the changing of the title bar ( :P ), but the change in the template does not seem to do anything (that's why I asked if defaultPageTemplate.html was the right file).

It displays the title of my index.html page.

I tried to place hardcoded text instead of <%TITLE%> but it keeps on showing he title of my index.html page.

Very best regards,

Olivier
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Tim Green »

Olivier Beltrami wrote: Tue Jan 12, 2021 10:05 am I tried to place hardcoded text instead of <%TITLE%> but it keeps on showing he title of my index.html page.
That gets updated automatically when the page is loaded.
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.
User avatar
Olivier Beltrami
Posts: 393
Joined: Mon Jul 15, 2002 3:30 pm
Location: Nantes, France
Contact:

Re: eWriter Creator Loses Help Contexts

Unread post by Olivier Beltrami »

I changed the Title of my index.html page and now it does what I want.
Thank you for all your help.
Olivier
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
Post Reply