Get and store URL parameters in responsive webhelp

rjcbop
Posts: 17
Joined: Wed Aug 08, 2018 10:23 pm

Get and store URL parameters in responsive webhelp

Post by rjcbop » Fri Aug 21, 2020 2:38 pm

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?

ionela
Posts: 343
Joined: Mon Dec 05, 2011 6:08 pm

Re: Get and store URL parameters in responsive webhelp

Post by ionela » Mon Aug 24, 2020 12:43 pm

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
Ionela Istodor
oXygen XML Editor and Author Support

rjcbop
Posts: 17
Joined: Wed Aug 08, 2018 10:23 pm

Re: Get and store URL parameters in responsive webhelp

Post by rjcbop » Wed Aug 26, 2020 3:40 pm

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.

Post Reply