Hiding top menu and search box in context sensitive help

Pascale
Posts: 40
Joined: Wed Jan 29, 2014 4:30 pm

Hiding top menu and search box in context sensitive help

Post by Pascale » Tue Jan 22, 2019 6:03 pm

Hi,

I would like to show or hide some of the WebHelp responsive components dynamically.

I know that I can do it statically at build time by setting the "webhelp.show.top.menu" and other parameters to either 'yes' or 'no', but I want to do it dynamically on a single webhelp package.
For example,
- when the webhelp page is loaded in a web browser on a desktop computer, I want to show everything
- when the webhelp page is loaded by an application in an iframe that has max. width=300 px, I want to hide the top menu and the search pane
and it should be possible to do both usages at the same time on the same webhelp content.

Is it possible ? How (by adding a parameter in the URL requesting the page or based on some info like the width of the parent frame or the context (PC, mobile device, ...) ?

Tx,
Pascale

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

Re: Hiding top menu and search box in context sensitive help

Post by ionela » Wed Jan 23, 2019 12:47 pm

Hi,

You could try to achieve this using JavaScript customization. More details about how to Insert HTML Content in WebHelp Responsive Output can be found in our user-manual:
https://www.oxygenxml.com/doc/versions/ ... -html.html

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support

Pascale
Posts: 40
Joined: Wed Jan 29, 2014 4:30 pm

Re: Hiding top menu and search box in context sensitive help

Post by Pascale » Thu Jan 31, 2019 8:52 pm

Hi,

thanks for your answer.
However, I forgot this is responsive HTML, thus Javascript is not needed, you can just customize the CSS:

Code: Select all


@media screen and (max-width: 300px) {
.wh_header,
.wh_footer,
.wh_breadcrumb,
.wh_search_input {
visibility: hidden;
display: none;
}
}
Good enough for me ;-)

Kind regards,
Pascale

Post Reply