Can I make an indexterm link to an element with webhelp classic transformation?

opeongo
Posts: 4
Joined: Mon Jun 21, 2021 7:07 pm

Can I make an indexterm link to an element with webhelp classic transformation?

Post by opeongo » Sun Jul 11, 2021 10:23 pm

I have a large DocBook document and I am transforming it with webhelp classic. I am starting to build an indexing capability by adding <indexterm> elements to the document. The webhelp index page is being built correctly as expected.

However, I notice that the index terms provide a link to the page that the index term is contained within. This is OK for brief pages, but for lengthier sections it becomes difficult to find the context that the index term is referring to.

Is it possible to have the index term link to the closest containing id (anchor)? For example, if I have a section of DocBook like the following that gets chunked to global.html::

Code: Select all

<para xml:id="global_layers">layers<indexterm><primary>layers</primary></indexterm></para>
then the l would like the index link to look like

Code: Select all

<a href="global.html#global_layers">layers</a>
Is there anything that I can change or customize to make this happen?