Page 1 of 1

Hiding top menu and search box in context sensitive help

Posted: Tue Jan 22, 2019 6:03 pm
by Pascale
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

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

Posted: Wed Jan 23, 2019 12:47 pm
by ionela
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

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

Posted: Thu Jan 31, 2019 8:52 pm
by Pascale
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