Hi..I'm trying to integrate 2 different responsive HTML5 outputs in our application as per the application theme selected by user, i.e. dark and light in my case.
I've created and published 2 different outputs for dark and light theme in RH2017. Currently only single output has been implemented and calls are made by using rhmapid.
Is there any way to conditionally call different published outputs as per the theme selected by appending the custom parameters to the calling URL, for ex. appending url with something like &theme=dark/light. Or anybody knows any other ways to do it.
Also do I need to maintain the separate files for both the outputs always, isn't there a way to use the same files for both the themes just by using separate CSS files?
The problem here as I see it is RoboHelp has no way of knowing which theme in the app has been selected by the user. The only solution I can see is that you create two outputs and your developers create some means of knowing what the user has selected and then call one of the two outputs.
That wouldn't work if the user has the help open and changes the theme but should be OK as long as they stick with a theme in that session. Next session should be OK as the developers' check will kick in.
Duplicate your output and in one change the output path and force a different CSS to be applied.
See www.grainge.org for free RoboHelp and Authoring information.
Yes Peter..seems I will have to go by publishing two outputs only as you mentioned, however we're trying out the way to use the same htm files somehow by adding our own script to switch the layout and content CSSs as per the theme by passing query parameters in the calling URL. Hope just overwriting the two CSS's (theme and content page) will be enough to get it work.
Anyways.. thanks for your quick response!