Skip to main content
deepak11528442
Participant
November 15, 2018
Question

Calling multiple published outputs in different layouts

  • November 15, 2018
  • 1 reply
  • 324 views

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?

This topic has been closed for replies.

1 reply

Peter Grainge
Community Expert
Community Expert
November 16, 2018

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.

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
deepak11528442
Participant
November 21, 2018

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!

Peter Grainge
Community Expert
Community Expert
November 21, 2018

It would be interesting to know how you get on.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.