Error linking to topic in an external H&M file

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
Dan Rosen
Posts: 52
Joined: Thu Sep 13, 2012 12:26 pm

Error linking to topic in an external H&M file

Unread post by Dan Rosen »

I seem to be missing something. Using external H&M links, I've been able to link an entire table of contents in another project to be a TOC entry in this project. What I can't seem to make happen is to pull in one topic from another project as a single page into this project. The compiler gives me an error message: "Links to external help file are not supported in table of contents: <topic name>". Is there a way to do this?

Eventually the goal is to build an H&M file that has topics that are common to multiple products and then link to them as needed.

Thanks, Dan
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Error linking to topic in an external H&M file

Unread post by Tim Green »

Hi Dan,

You can't embed a single topic from another WebHelp collection in the current collection (that is what a single WebHelp project in a folder on the web server is called). This is because of the tightly integrated way WebHelp works. As far as collection A is concerned, collection B is simply another website. In old standard skins in which the topics are displayed in an iFrame you can display the entire other collection in the topic iFrame, since it can contain any page. That isn't possible in V3 and V4 Premium Pack skins, which are frameless, however. There you can only replace the entire page with the other page.

The only clean way to do this, no matter whether your collection uses an iFrame or is frameless, is to set the target option of the link to open the other topic a new window or tab.
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.
Dan Rosen
Posts: 52
Joined: Thu Sep 13, 2012 12:26 pm

Re: Error linking to topic in an external H&M file

Unread post by Dan Rosen »

HI Tim,

Thanks for the usual quick reply. If I understand correctly, that if we still want to embed pages from another H&M project, then it has to be an entire collection, not just a single page. Correct?

.. Dan
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Error linking to topic in an external H&M file

Unread post by Tim Green »

Dan Rosen wrote: Thu Jul 16, 2020 1:35 pmThanks for the usual quick reply. If I understand correctly, that if we still want to embed pages from another H&M project, then it has to be an entire collection, not just a single page. Correct?
Well, yes, but it's not really embedding. You're just doing a one-off display of the entire other collection inside the current topic frame. That will only work in frame-based skins, and it is definitely something you want to avoid.

It is much better to display anything in an external collection in a separate tab to make it clear that it is something separate. Either that, or bind the topics from the other project into your own project as snippets in topics without TOC entries at the project stage, and then link to that:
  1. Create an empty topic file in the Project Files > Topic Files section (then it won't have a TOC entry).
  2. Use the Snippet tool to Insert the topic from the other project into that file as a linked snippet, using the From File option. The other project must be saved as an uncompressed HMXP for this, so that you can select the topic file from its \Topics Folder.
  3. Then link to the topic file containing the snippet instead of to the other collection.
If you want the topic to have a TOC entry you can create a normal topic and then insert the snippet there.
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.
Dan Rosen
Posts: 52
Joined: Thu Sep 13, 2012 12:26 pm

Re: Error linking to topic in an external H&M file

Unread post by Dan Rosen »

HI TIm, Thanks the snippet approach worked. I assume that if the snippet has links to sub-pages, then each of those sub-pages also needs to be imported into their own page as a snippet and that the page ids match?

.. Dan
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Error linking to topic in an external H&M file

Unread post by Tim Green »

Dan Rosen wrote: Thu Jul 16, 2020 2:44 pm I assume that if the snippet has links to sub-pages, then each of those sub-pages also needs to be imported into their own page as a snippet and that the page ids match?
Yes, a snippet is only a formatted text block, not a page. That is why you need to insert it into a topic.
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.
Dan Rosen
Posts: 52
Joined: Thu Sep 13, 2012 12:26 pm

Re: Error linking to topic in an external H&M file

Unread post by Dan Rosen »

I understand, thanks very much. .. Dan
Post Reply