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

Issues with Relative Paths When Navigating to Output Pages Directly

Explorer ,
Jul 25, 2013 Jul 25, 2013

Copy link to clipboard

Copied

At my company, we're looking to implement a new help method for a SaaS-based website. It requires both:

  1. Context sensitive help viewed by accessing the HTM output page in the project directly. (/help/MoreInfo/X.htm)
  2. Access to the entire help project accessed by the standard method. (/help/Index.htm, with all content appearing within the frame).

I'm running into an issue with #1. Here's what's going on:

  1. The help file resides in the web server (http://example.com/help/).
  2. The user navigates to a page in the site (http://example.com/UserFinancials/Cashflow/page.htm).
  3. The user clicks on one of the help links on the page.
    • There are various help links on a page, each for a specific section.
    • Each help page is tiny: 4-5 lines, tops. Basically a glorified tool tip. But they all have a "More Information" link.
  4. The help icon for a section is linked directly to a page within the project: (http://example.com/help/Financial/Users/Cashflow.htm).
  5. The linked-to page opens just fine as a windowed frame
  6. They click "More Information" (which is located at http://example/help/MoreInfo/X.htm)

Looking into it, I saw that RoboHelp writes links using relative paths ("../../MoreInfo/X.htm" vs "~/help/MoreInfo/X.htm").

The problem we're running into is that the relative paths for links are taking into account the page they're being displayed on, rather than the project. This is due to how the information is being loaded: not as a standalone window pop-up, but as an embedded div, integrated into the page:

<div class="modal" id="divhelpinfopopup">
        <ul class="modal-menu">
        <li class="close-menu-button" title="Close" onclick="$('#divhelpinfopopup').hide();">
          <span aria-hidden="true" class="icon-close pull-right"></span>
        </li>
      </ul>
        <h3>Help</h3>
        <div class="modal-content" id="divhelpcontent">

        </div>
    </div>

Example: If I'm on http://example.com/UserFinancials/Cashflow/page.htm and I click Help for the Cashflow section, http://example.com/help/Financial/Users/Cashflow.htm comes up. However, when I click on the "More Information" link, the system looks for ../../MoreInfo/X.htm -- but it's doing the ../ relative to the web page (http://example.com/UserFinancials/Cashflow/page.htm) rather than the help page (http://example.com/help/Financial/Users/Cashflow.htm). The final URL is therefore http://example.com/MoreInfo/X.htm, instead of http://example.com/help/MoreInfo/X.htm.

So my question: Is there any way for me to insert an absolute path for links (/help/) instead of relative paths (../../) without using the standard shell (/help/index.htm)?

I realize this may be a complicated question, and that the only answer may be "hard code links or use the shell", but I thought I'd try. Haven't seen this addressed anywhere.

Thanks in advance

Views

395

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
LEGEND ,
Jul 30, 2013 Jul 30, 2013

Copy link to clipboard

Copied

LATEST

Hi,

If I understand the problem correctly, I see two ways of going forward:

1. Hard code the entire URL.

2. Calculate the correct URL with JavaScript. I have a JS function for that on: http://www.wvanweelden.eu/blog/2012/08/03/get-relative-link-project-root

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
Resources
RoboHelp Documentation
Download Adobe RoboHelp