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

Converting absolute links to relative links

New Here ,
Sep 01, 2009 Sep 01, 2009

Copy link to clipboard

Copied

Using RH 7 HTML our corp wants to have help files able to function as "standalone" files on local PC's without network or server for business continuity. Presently most files have 150 or less topics and are published to a server. External files are in sub folders within the folder where the published file is located. Links to external attachments (.doc, .xls, .pdf, etc.) are absolute links and need to be changed to relative. An example existing link would be: HTTP://server.com/help/attachments/fname/sample.doc.  Help is the foler where tje published file is located and Attachments is the folder where the external files to be linked are located. When link is changed to: ../Attachments/  some links work and some don't. I discovered that some links require: ../../Attachments/ to function correctly. It appears that links that are not in the root path of the project manager require additional ../'s. I am trying to find out how RH7 reads the links and how to back out of a directory and when. Any help is appreciated. Thanks.

Views

4.2K

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

Advisor , Sep 02, 2009 Sep 02, 2009

The easiest, and most efficient, way is to replicate the folder environment onto your local machine (all folders and files exactly as they will appear in the destination area), and let RH do the heavy lifting.

Therefore, to link to anything outside the current RH project, the method is:

  1. Select Link to: File in the Hyperlink dialog.
  2. When you select your link destination from the Select File dialog and click Open, the Link to: field initially displays the absolute path.
  3. Click OK.
  4. Now, double click th
...

Votes

Translate

Translate
LEGEND ,
Sep 01, 2009 Sep 01, 2009

Copy link to clipboard

Copied

Hi,

You say that the files are stand alone, but that the files will be in a subfolder of your output. Does this mean that you can add the files as baggage files to your project, or is that impossible.

About the ../ and ../../, it simply means take parent directory and take parent directory of parent directory. When you have a file in MyFile/Doc/Important/ and the topic is in MyFile/Robo, the path will be ../Doc/Important. When the topic is in the directory MyFile/Robo/Project, the path will be ../../Doc/Important. When you add the files as baggage files, you simply add a hyperlink to the file and let Robo sort out the hyperlink. If you can't attach the files as baggage files, you'll have to manually add all relative links. I can't think of an easy way to automate this. Altough a developer might be able to create a script for you.

Greet,

Willam

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
Advisor ,
Sep 02, 2009 Sep 02, 2009

Copy link to clipboard

Copied

The easiest, and most efficient, way is to replicate the folder environment onto your local machine (all folders and files exactly as they will appear in the destination area), and let RH do the heavy lifting.

Therefore, to link to anything outside the current RH project, the method is:

  1. Select Link to: File in the Hyperlink dialog.
  2. When you select your link destination from the Select File dialog and click Open, the Link to: field initially displays the absolute path.
  3. Click OK.
  4. Now, double click the link to reopen the Hyperlink dialog; RH has magically transformed the link into a relative path.

(You'll get an info message about linking to an external file...when you initially create the link and every time you open it...just ignore it.)

We use this method in a 42-project merged project, and it's never failed us. The only time that your links will break is when you copy or move a file to another location. Since the relative paths are no longer valid, RH will automatically assign the links to within the current topic; you'll need to re-assign the link manually.

Good luck,

Leon

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 ,
Sep 02, 2009 Sep 02, 2009

Copy link to clipboard

Copied

This is a good solution for the future, but is there a way to use Multi-file find and replace to convert current absolute paths to relative? Thanks.

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
Advisor ,
Sep 02, 2009 Sep 02, 2009

Copy link to clipboard

Copied

LATEST

Yes, as long as you can identify each of the offending links in relation to your current project AND what the original link path was.

In other words, not very likely. Sorry.

Good luck,

Leon

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 ,
Sep 02, 2009 Sep 02, 2009

Copy link to clipboard

Copied

Thank you for your help.

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