Get and store URL parameters in responsive webhelp

Post here questions and problems related to editing and publishing DITA content.
rjcbop
Posts: 56
Joined: Wed Aug 08, 2018 10:23 pm

Get and store URL parameters in responsive webhelp

Post 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?
ionela
Posts: 402
Joined: Mon Dec 05, 2011 6:08 pm

Re: Get and store URL parameters in responsive webhelp

Post 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
Ionela Istodor
oXygen XML Editor and Author Support
rjcbop
Posts: 56
Joined: Wed Aug 08, 2018 10:23 pm

Re: Get and store URL parameters in responsive webhelp

Post 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.
Post Reply