Page 1 of 1

Move the search bar to the menu ?

Posted: Sun Sep 16, 2018 8:02 pm
by patrick-kox
Another nOOb question,

How do I move the search bar from it's current location to the menu (like it's displayed here on the forums) ?

And additional how do I change it's content when blank from "webhelp.search" into something different ?

tnx.

Re: Move the search bar to the menu ?

Posted: Mon Sep 17, 2018 4:02 pm
by ionela
Hi,

Using oXygen XML v20.1 you could achieve this following these steps:
  • Save you favorite template as explained here: https://www.oxygenxml.com/doc/versions/ ... plate.html. Note that you need to check the "Include HTML Page Layout Files" option.
  • Open the resulted archive in Oxygen to edit the HTML page layout files ("wt_index.html", "wt_search.html", "wt_terms.html" and "wt_topic.html").
  • Add the

    Code: Select all

    <whc:webhelp_search_input/>
    element in the "header.xml" file where you need it to be displayed and remove it from "wt_index.html", "wt_search.html", "wt_terms.html" and "wt_topic.html" files.
  • Edit the transformation scenario and choose your customized publishing template using the "Choose Custom Publishing Template" link.
Please note that you may need to also use a custom CSS to customize the search form according to your needs.

Regards,
Ionela

Re: Move the search bar to the menu ?

Posted: Mon Sep 17, 2018 4:51 pm
by patrick-kox
Thanks, that seems to work.

Can you also provide some more information on the CSS that I need to modify ? On the main page it way too big and I'd like to make it more integrated with the Ashes (dark gray) theme.

Thanks!

Re: Move the search bar to the menu ?

Posted: Mon Sep 24, 2018 11:25 am
by Costin
Hi,

You need to develop your own custom CSS, which you could then include in your publishing template. You can declare multiple CSS files that would be used to customize the WebHelp output in the "Resources" element of the publishing template's descriptor file (.opt).
For more hints, you should take a look at the video demonstration from the "Creating a Publishing Template" User-Guide section Ionela referred in the previous post and also read the Publishing Template Package Contents for WebHelp Responsive Customizations section from the User-Guide.

Regards,
Costin

Re: Move the search bar to the menu ?

Posted: Tue Sep 03, 2019 11:37 pm
by rjcbop
Regarding the recommendation to modify the HTML page layout files, I see that it's now not advised to do that (https://www.oxygenxml.com/doc/versions/ ... _templates).

We too want to move the search control to the top of the page. Is there a different method for accomplishing that, that won't be affected by product upgrades?

Re: Move the search bar to the menu ?

Posted: Wed Sep 04, 2019 12:16 pm
by ionela
Hi,

Unfortunately, in this case as you need to modify the structure of the generated HTML files there is no other way to do accomplish this (it is the easiest way for the time being). We are working on improving this procedure in a future version of oXygen XML.

Regards,
Ionela