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 .
Could anyone help me with this. (@petergrainge )
Regards,
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.
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
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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied