Page 1 of 1

Get and store URL parameters in responsive webhelp

Posted: Fri Aug 21, 2020 2:38 pm
by rjcbop
We'd like to read in one or more parameters from the URL that launches oXygen responsive webhelp, with the aim of using those parameters to dynamically filter content. We've found that we can read in parameters by modifying the context-help.js file, that's deployed with responsive webhelp, but of course our changes would get overwritten in any new versions of the responsive webhelp plugin. Is there any other mechanism for accomplishing what we want to do?

Re: Get and store URL parameters in responsive webhelp

Posted: Mon Aug 24, 2020 12:43 pm
by ionela
Hi,

It is not recommended to modify the context-help.js or other built-in files from the oXygen XML WebHelp deployment. The mechanism to accomplish this is to implement your own JavaScript and include it to the WebHelp output using the procedure described in our user manual:
You can add custom HTML content in the WebHelp Responsive output

Regards,
Ionela

Re: Get and store URL parameters in responsive webhelp

Posted: Wed Aug 26, 2020 3:40 pm
by rjcbop
Hi Ionela,

Thanks for the response. Since we wanted to preserve the context sensitive help mechanism, while reading in more parameters from the URL, we've created a custom javascript that has the same code as context-help.js, but uses a different parameter name for the context sensitive help ID so that any redirect to a specified topic happens from our script and not from the built-in version of context-help.js. This allows us to capture additional parameters from the calling URL. Thanks for the great support that you and your team provide to your users.