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

Robohelp 2019 - Adding a Dynamic URL to Responsive HTML5

Explorer ,
Sep 12, 2019 Sep 12, 2019

Copy link to clipboard

Copied

Hi, 

I want to add a tiny bit of JavaScript to my help content that reads the URL currently displaying the HTML5 page and show the host component of the URL being shown.

I want to use that function to append the following TEXT description  as follows: We suggest you enter your host name ("Host Name/URL) in the field.

The Host Name/URL should fetch the part of URL (till .com, path is not required) currently displaying the HTML5 help page .

  1. I am not sure how to write a javascript as i donot know Java.
  2. How and where i should add the javascript. 
  3. What should i write in the below highlighted portion so tha it gets replaced with the URL

1.png

Could anyone help me with this. (@petergrainge )

 

Regards,

Views

675

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 ,
Sep 12, 2019 Sep 12, 2019

Copy link to clipboard

Copied

Assuming that the highlighted bit is what you want to insert by javascript, We suggest you enter your host name ("Host Name/URL) in the field.

 

Googling suggests that window.location.hostname should grab what you want. I'm not sure how you then insert that in the topic. I'm also not sure if anythng special is needed to work with Robohelp.

 

If you are hosting the help only on your own server though, you could just enter the hostname as plain text.

 

Or, if you're generating customised content for each client, hosted on their own servers, you could use variables so that the correct site is displayed for each client.

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
Explorer ,
Sep 13, 2019 Sep 13, 2019

Copy link to clipboard

Copied

I am generating customised content for each client, hosted on their own servers. Could you please let me know - how do i use variables to acheive the below task.

Suppose the help URl is www.abc.asset.com/forum/editpage/...so i want "www.abc.asset.com" to be displayed.

Similarly when some other tenant if the URL is www.ghk.asset.com/a/b/fgh then i want www.ghk.asset.com to be displayed in the 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
Community Expert ,
Sep 13, 2019 Sep 13, 2019

Copy link to clipboard

Copied

In Author mode you create a master list of variables with default values. In Outputs you create sets, one for each client. In the preset, you select the required variable set.

 

I would create a preset for each client where the required set is selected but you can just have one and change the set each time. Just make sure you do change the set!

 

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
Explorer ,
Sep 13, 2019 Sep 13, 2019

Copy link to clipboard

Copied

There are more then 50 clients and it might increase too. So in that scenario, what should be done?

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 ,
Sep 13, 2019 Sep 13, 2019

Copy link to clipboard

Copied

The joys of customising help for clients!

 

I don't know if variables will be enough or if you need a set for each client. It might be that 10 clients would have the same values so they would only need one set. That's something only you can determine based on what changes for each client.

You might also need to consider tags to exclude content/topics for some customers.

Sorry but customised help carries a big overhead.

 

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
Explorer ,
Sep 15, 2019 Sep 15, 2019

Copy link to clipboard

Copied

LATEST
Thank you..

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