Skip to main content
Participant
March 24, 2021
Answered

Convert hyperlinks to cross-references

  • March 24, 2021
  • 4 replies
  • 720 views

I have upgraded a project from classic RoboHelp 2019 to RoboHelp 2020, and I would like to take advantage of the new cross-reference feature. Is there an easy way to convert thousands of hyperlinks into cross-reference links? I've found that I can fairly easily edit the HTML to create cross-reference links to topic titles. But really I would prefer to have cross-references to heading text. Those HTML edits are not working correctly, however. When I change an existing hyperlink to the desired cross-reference as shown below, RoboHelp magically erases the entire link, like so: <p class="RelatedTopics" dir="ltr"> </p>

 

Existing hyperlink:

<p class="RelatedTopics" dir="ltr"><a href="Parking_tools.htm#XREF_56756_Parking_Area_Tools">Parking tools</a></p>

 

Desired cross-reference:

<p class="RelatedTopics" dir="ltr"><a data-xref="{text}" href="Parking_tools.htm">Parking tools</a></p>

 

This topic has been closed for replies.
Correct answer Amebr

It looks like you can't just change the links to cross references in the html because part of the Insert XRef process creates id values against the selected page element in the destination topic.

 

So for example, say you have Destination_Topic.htm that looks like this.

 

<h1>Destination Topic</he>

<p>This is my destination paragraph.</p>

 

In Random_Topic.htm you add a cross reference to the paragraph in Destination_Topic.htm.

 

Now Destination_Topic.htm looks like this:

<h1>Destination Topic</h1>

<p id="p">This is my destination paragraph.</p>

 

@Vivek Kumar Is there an updated scripting guide for RH2020? The link on the website is broken and seems to still point to the RH2019 one (the 2019 one should still be available for people who haven't updated at this time, though) 

4 replies

Peter Grainge
Community Expert
Community Expert
March 26, 2021

The problem I am seeing with scripting a conversion is there are multiple types of cross reference, see the dialog for setting up a cross reference. How would a script be able to configure that?

 

I'm no developer but it looks like a blocker.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Participant
March 26, 2021

I have just started using RoboHelp 2020, so all of my links are hyperlinks to headings currently. Maybe I'll use some of the fancy cross-references in my next release, haha. The feature request Bug Id is RH-9019, if you wanna vote for it. (Please do!) Thanks, everyone.

Community Expert
March 25, 2021

You can request features and report issues here: https://tracker.adobe.com/

 

Include the link to this thread in the request so staff can have a look as well. And post the tracker ID here so other forum visitors can vote on it. 

 

(I feel like there might need to be a dedicated function for programmatically creating cross references, as well as a script for non-developers  🙂  , given that inserting an xref updates both the source topic and destination topic.)

AmebrCommunity ExpertCorrect answer
Community Expert
March 25, 2021

It looks like you can't just change the links to cross references in the html because part of the Insert XRef process creates id values against the selected page element in the destination topic.

 

So for example, say you have Destination_Topic.htm that looks like this.

 

<h1>Destination Topic</he>

<p>This is my destination paragraph.</p>

 

In Random_Topic.htm you add a cross reference to the paragraph in Destination_Topic.htm.

 

Now Destination_Topic.htm looks like this:

<h1>Destination Topic</h1>

<p id="p">This is my destination paragraph.</p>

 

@Vivek Kumar Is there an updated scripting guide for RH2020? The link on the website is broken and seems to still point to the RH2019 one (the 2019 one should still be available for people who haven't updated at this time, though) 

Vivek Kumar
Adobe Employee
Adobe Employee
March 25, 2021

We haven't added any new API in 2020 so 2019 guide is still very much relevant. Having said that updated guide should be available. I will get this done. We do plan to work on newer APIs in update 5 and onwards, we will share details as they become available.

Vivek Kumar
Adobe Employee
Adobe Employee
March 25, 2021

You can write a script to do it but you will need to have someone with JavaScript expertise. VariableConverter or GlossaryTermConverter samples can be used as the base.