Skip to main content
June 25, 2012
Question

Using a variable to insert into a URL for redirecting clients

I got a good one, can anyone help on this?

Using RoboHelp Version 8.02.208.

My company uses MicroStrategy to deploy several web-based data analysis products.

Each of these data products (there are 5) are deployed on different servers.

I have set up a single source WebHelp project and use build tags for product specific help output.

(I also have to modify the Start Page, TOC and Default Topic settings prior to generating each product help)

Everything on this works fine and is not a problem.

We have just implemented an Excel add-in for one of the products.

That add-in uses a locally installed CHM file for its help.

In order to provide customized help that can be updated without forcing the clients to reinstall the CHM help file locally, the source for the CHM file has one dummy topic. In that topic, I have used HTML code to redirect the client to the WebHelp for the product and have integrated the Excel add-in help to that product’s customized help. The result is that the CHM file is opened locally in the HTML help viewer. Inside the HTML help viewer window, I open the WebHelp.

The redirect HARD CODES the URL with the product specific server name and Start Page help topic.

That works fine and is not a problem for ONE PRODUCT.

We are in the process of adding this Excel add-in to other products.

Now here is where I cannot get this to work with my implementation.

The URL for each product is different and to make matters worse, the Start Page is different for each product as well.

So, I am working on options for implementation of multiple products and here is my question:

(1)    The following is an example of the redirect in the single topic of the CHM file:

<meta http-equiv="refresh" content="0;URL=https://server.com/ProductName/WebHelp/StartPage.htm#mergedProjects/ExcelPlugIn/ Overview.htm" />

(2)    The red portion of the URL above will need to be modified to support each individual product with a custom server, product name and start page HTM file name.

Is there a way to:

(1)    Add a variable in this HTML code

(2)    Once the product is identified, update the variable with the product specific URL content

(3)    Integrate the variable into the target URL of the HTML code that does the redirect

I think this is either not possible or more work than needed. My other option is to provide standalone Excel add-in help on a server and just have the Excel plug-in go to that (right now it is integrated into the product specific help and the client has access to the plug-in help AND the application help all at the same place).

Thanks to all in advance for any help/suggestions.

Michael F Weart

mweart@corelogic.com

    This topic is closed to new replies. Start a new post to keep the conversation going.

    4 replies

    Captiv8r
    Legend
    June 25, 2012

    Hi Michael

    Instead of amending the URL, why not have a different redirect page for each product and control the page that is included by applying a build tag to the topic?

    Just thinking out loud here... Rick

    Helpful and Handy Links

    RoboHelp Wish Form/Bug Reporting Form

    Begin learning RoboHelp HTML 7, 8 or 9 within the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone Blog

    RoboHelp eBooks

    Translate
    Willam van Weelden
    Inspiring
    June 26, 2012

    Rick's solution is simple and elegant. I couldn't resist pointing out the hard way anyway.

    The hard way would be to conditionalize the redirect using JavaScript. You somehow save the correct parameter on the page (for example with a variable) and you use a script to read that value. The script can then redirect to the desired URL. I would go this way because you only need a single page, but this is not the easy, straightforward way.

    Greet,

    Willam

    Translate