Highlighted

Robohelp 2019 - Adding a Dynamic URL to Responsive HTML5

Explorer ,
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,

Topics

Documentation, HTML, HTML help, HTML5 layout, RH for Word

Views

395

Likes

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

Robohelp 2019 - Adding a Dynamic URL to Responsive HTML5

Explorer ,
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,

Topics

Documentation, HTML, HTML help, HTML5 layout, RH for Word

Views

396

Likes

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
Sep 12, 2019 0
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Sep 12, 2019 1
Explorer ,
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

Likes

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
Reply
Loading...
Sep 13, 2019 0
Adobe Community Professional ,
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!

 

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

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
Reply
Loading...
Sep 13, 2019 0
Explorer ,
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?

Likes

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
Reply
Loading...
Sep 13, 2019 0
Adobe Community Professional ,
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.

 

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

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
Reply
Loading...
Sep 13, 2019 1
LijaNair LATEST
Explorer ,
Sep 15, 2019

Copy link to clipboard

Copied

Thank you..

Likes

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
Reply
Loading...
Sep 15, 2019 0