Move the search bar to the menu ?

Post here questions and problems related to editing and publishing DITA content.
patrick-kox
Posts: 13
Joined: Sat Jun 23, 2018 4:57 pm

Move the search bar to the menu ?

Post 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.
ionela
Posts: 407
Joined: Mon Dec 05, 2011 6:08 pm

Re: Move the search bar to the menu ?

Post 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
Ionela Istodor
oXygen XML Editor and Author Support
patrick-kox
Posts: 13
Joined: Sat Jun 23, 2018 4:57 pm

Re: Move the search bar to the menu ?

Post 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!
Costin
Posts: 846
Joined: Mon Dec 05, 2011 6:04 pm

Re: Move the search bar to the menu ?

Post 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
Costin Sandoi
oXygen XML Editor and Author Support
rjcbop
Posts: 56
Joined: Wed Aug 08, 2018 10:23 pm

Re: Move the search bar to the menu ?

Post 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?
ionela
Posts: 407
Joined: Mon Dec 05, 2011 6:08 pm

Re: Move the search bar to the menu ?

Post 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
Ionela Istodor
oXygen XML Editor and Author Support
Post Reply