Skip to main content
Inspiring
September 13, 2019
Question

Robohelp 2019 - Adding a Dynamic URL to Responsive HTML5

  • September 13, 2019
  • 3 replies
  • 860 views

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

Could anyone help me with this. (@petergrainge )

 

Regards,

This topic has been closed for replies.

3 replies

Peter Grainge
Community Expert
Community Expert
September 13, 2019

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.

 

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Lija.NAuthor
Inspiring
September 16, 2019
Thank you..
Peter Grainge
Community Expert
Community Expert
September 13, 2019

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!

 

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Lija.NAuthor
Inspiring
September 13, 2019
There are more then 50 clients and it might increase too. So in that scenario, what should be done?
Community Expert
September 13, 2019

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.

Lija.NAuthor
Inspiring
September 13, 2019

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