• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Convert hyperlinks to cross-references

New Here ,
Mar 24, 2021 Mar 24, 2021

Copy link to clipboard

Copied

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>

 

TOPICS
New UI

Views

303

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 24, 2021 Mar 24, 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</

...

Votes

Translate

Translate
Adobe Employee ,
Mar 24, 2021 Mar 24, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2021 Mar 24, 2021

Copy link to clipboard

Copied

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) 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 24, 2021 Mar 24, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Thanks! This is very helpful, but I don't have a JavaScript expert at my disposal at the moment. If someone at Adobe wanted to make a nice conversion script, I'd be happy to test it for you, haha. I'm sure a lot of customers would be interested in such a thing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

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.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

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

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp